The following workflow outlines how I use Leasot in my daily workflow w/ VSCode.
There are two unique parts that I use
| #!/usr/bin/env node | |
| console.log('Welcome to Codedungeon gist') |
| #!/usr/bin/env node | |
| const PWD = process.env.PWD; | |
| const fs = require("fs"); | |
| const path = require("path"); | |
| const { spawnSync } = require("child_process"); | |
| const spawnOptions = { | |
| cwd: path.normalize("./"), | |
| shell: true, |
| const formatDate = (date = '', useAMPM = true) => { | |
| date = ((date === '') || (date === null)) ? date = new Date() : date; | |
| // build time | |
| let hours = date.getHours(); | |
| let minutes = date.getMinutes(); | |
| let seconds = date.getSeconds(); | |
| let ampm = ''; |
| module.exports = { | |
| "env": { | |
| "es6": true, | |
| "node": true, | |
| "jest": true | |
| }, | |
| "extends": "eslint:recommended", | |
| "parserOptions": { | |
| "ecmaVersion": 2017 | |
| }, |
| 1) Create a branch with the tag | |
| git branch {tagname}-branch {tagname} | |
| git checkout {tagname}-branch | |
| 2) Include the fix manually if it's just a change .... | |
| git add . | |
| git ci -m "Fix included" | |
| or cherry-pick the commit, whatever is easier | |
| git cherry-pick {num_commit} | |
| import * as fs from "fs"; | |
| import * as morgan from "morgan"; | |
| import * as path from "path"; | |
| const rfs = require("rotating-file-stream"); | |
| class ExpressLogger { | |
| constructor(app: any) { | |
| const logDirectory: string = path.join(__dirname, "../", "log"); | |
| fs.existsSync(logDirectory) || fs.mkdirSync(logDirectory); // create logDir if it doesnt exist |
| import chalk from "chalk"; | |
| import * as dateFormat from "dateformat"; | |
| // import { dump } from "dumper.js"; | |
| const dump = require("dumper.js"); | |
| /* eslint-disable-next-line */ | |
| const log = console.log; | |
| export default class Helpers { | |
| public static passIcon = "✓"; | |
| public static failIcon = "✖︎"; |
| { | |
| "extends": "eslint:recommended", | |
| "parser": "typescript-eslint-parser", | |
| "plugins": ["typescript"], | |
| "overrides": [ | |
| { | |
| "files": ["*-test.js", "*.spec.js"], | |
| "rules": { | |
| "no-unused-expressions": "off" | |
| } |
| { | |
| "compilerOptions": { | |
| "outDir": "./build", | |
| "rootDir": "./", | |
| "noImplicitAny": true, | |
| "target": "es5", | |
| "sourceMap": false, | |
| "allowSyntheticDefaultImports": false, | |
| "allowJs": true, | |
| "jsx": "react", |