add 2021
This commit is contained in:
16
2021/yarn_boilerplate/main.ts
Normal file
16
2021/yarn_boilerplate/main.ts
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
import { readFileSync } from "fs"
|
||||
import { argv, exit } from "process"
|
||||
|
||||
function main(): void {
|
||||
console.log(JSON.stringify(argv))
|
||||
if (argv[2] && argv[2] != "") {
|
||||
const values = readFileSync(argv[2], "utf8")
|
||||
const inputs = values.replace('\n', '').split(',')
|
||||
console.log(JSON.stringify(inputs))
|
||||
} else {
|
||||
console.log("No filename")
|
||||
exit()
|
||||
}
|
||||
}
|
||||
main()
|
19
2021/yarn_boilerplate/package.json
Normal file
19
2021/yarn_boilerplate/package.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "change_me",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "node build/first.js",
|
||||
"build": "tsc",
|
||||
"watch": "yarn run build -- -w",
|
||||
"monitor": "nodemon build/first.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"nodemon": "^2.0.15",
|
||||
"typescript": "^4.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.11"
|
||||
}
|
||||
}
|
14
2021/yarn_boilerplate/tsconfig.json
Normal file
14
2021/yarn_boilerplate/tsconfig.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"noImplicitAny": true,
|
||||
"removeComments": true,
|
||||
"preserveConstEnums": true,
|
||||
"outDir": "./build",
|
||||
"strict":true,
|
||||
"esModuleInterop":true,
|
||||
"inlineSourceMap":true
|
||||
},
|
||||
"exclude":["node_modules"]
|
||||
}
|
Reference in New Issue
Block a user