parent
698c08cf4e
commit
68d1df1d1b
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -9,7 +9,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "yarn",
|
"prebuild": "yarn",
|
||||||
"build": "tsc && ncc build lib/index.js --source-map --license licenses.txt",
|
"build": "tsc && ncc build lib/index.js --source-map --license licenses.txt",
|
||||||
"lint": "prettier --check \"src/**/*.{js,ts}\" && eslint src/**/*.ts",
|
"lint": "prettier --check \"src/**/*.{js,ts}\" && eslint src --ext .js,.ts --max-warnings=0",
|
||||||
"format": "prettier --write \"src/**/*.{js,ts}\"",
|
"format": "prettier --write \"src/**/*.{js,ts}\"",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"prepare": "husky install"
|
"prepare": "husky install"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { basename } from 'path';
|
|
||||||
|
|
||||||
import { run as main } from './main';
|
import { run as main } from './main';
|
||||||
|
import path from 'path';
|
||||||
import { run as post } from './post';
|
import { run as post } from './post';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -13,8 +12,8 @@ import { run as post } from './post';
|
||||||
* the argv[1] is going to be the full path to the script.
|
* the argv[1] is going to be the full path to the script.
|
||||||
* In case index.js would be marked executable and executed directly without the argv[1] it defaults to "main.js".
|
* In case index.js would be marked executable and executed directly without the argv[1] it defaults to "main.js".
|
||||||
*/
|
*/
|
||||||
async function run([_, name = 'main.js']: string[]) {
|
async function run([, name = 'main.js']: string[]) {
|
||||||
const script = basename(name);
|
const script = path.basename(name);
|
||||||
|
|
||||||
switch (script) {
|
switch (script) {
|
||||||
case 'main.js':
|
case 'main.js':
|
||||||
|
|
Loading…
Reference in New Issue