Skip to content

Commit

Permalink
mv script to bin
Browse files Browse the repository at this point in the history
  • Loading branch information
vadistic committed Nov 9, 2020
1 parent 605a1e3 commit 7ce0210
Show file tree
Hide file tree
Showing 6 changed files with 438 additions and 394 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test
24 changes: 1 addition & 23 deletions bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
#!/usr/bin/env node

// eslint-disable-next-line @typescript-eslint/no-var-requires
require('ts-node').register({
compilerOptions: {
moduleResolution: 'node',
module: 'commonjs',

target: 'es2018',
lib: ['dom', 'esnext'],

esModuleInterop: true,
allowSyntheticDefaultImports: true,

experimentalDecorators: true,
emitDecoratorMetadata: true,

allowJs: true,
},

transpileOnly: true,
preferTsExts: false,
skipProject: true,
pretty: true,
})
require('./register')

require('../dist/runner').runner()
5 changes: 5 additions & 0 deletions bin/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env node

require('./register')

require('../src/runner').runner()
6 changes: 0 additions & 6 deletions scripts/cli.js → bin/register.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#!/usr/bin/env node

// TODO: get project ts-config

// eslint-disable-next-line @typescript-eslint/no-var-requires
require('ts-node').register({
compilerOptions: {
Expand All @@ -25,5 +21,3 @@ require('ts-node').register({
skipProject: true,
pretty: true,
})

require('../src/runner').runner()
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"tsask": "bin/cli.js"
},
"scripts": {
"clean": "rm -rf dist",
"build": "tsc -p ./tsconfig.build.json",
"dev": "node scripts/cli.js",
"clean": "rm -rf dist",
"dev": "node bin/dev.js",
"format": "prettier --write src/**/*.ts",
"lint": "eslint --ext .ts src/**/*",
"prepublishOnly": "yarn format && yarn lint && yarn clean && yarn build",
Expand All @@ -31,21 +31,21 @@
"fs-extra": "^9.0.1",
"globby": "^11.0.1",
"open": "^7.3.0",
"sort-package-json": "^1.46.0",
"sort-package-json": "^1.46.1",
"ts-node": "*"
},
"devDependencies": {
"@types/fs-extra": "^9.0.2",
"@types/jest": "^26.0.14",
"@types/node": "^14.11.10",
"@types/fs-extra": "^9.0.3",
"@types/jest": "^26.0.15",
"@types/node": "^14.14.6",
"@vadistic/eslint-config": "^0.5.0",
"@vadistic/prettier-config": "^0.5.0",
"eslint": "^7.11.0",
"eslint": "^7.13.0",
"eslint-plugin-prettier": "^3.1.4",
"jest": "^26.5.3",
"jest": "^26.6.3",
"prettier": "^2.1.2",
"ts-jest": "^26.4.1",
"typescript": "^4.0.3"
"ts-jest": "^26.4.4",
"typescript": "^4.0.5"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit 7ce0210

Please sign in to comment.