Skip to content

Commit

Permalink
use npm run
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieudutour committed Nov 6, 2017
1 parent 7f005db commit f2c3eff
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 18 deletions.
41 changes: 26 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,45 @@
},
"description": "Kactus build dependencies",
"scripts": {
"cli": "ts-node --require ./app/test/globals.ts --require ./app/src/cli/dev-commands-global.js app/src/cli/main.ts",
"test:integration": "cross-env TEST_ENV=1 ELECTRON_NO_ATTACH_CONSOLE=1 xvfb-maybe mocha -t 30000 --compilers ts:ts-node/register,tsx:ts-node/register app/test/integration/*.ts",
"test:unit": "cross-env GIT_AUTHOR_NAME=\"Joe Bloggs\" GIT_AUTHOR_EMAIL=\"[email protected]\" GIT_COMMITTER_NAME=\"Joe Bloggs\" GIT_COMMITTER_EMAIL=\"[email protected]\" TEST_ENV=1 ELECTRON_NO_ATTACH_CONSOLE=1 xvfb-maybe electron-mocha -t 10000 --renderer --compilers ts:ts-node/register,tsx:ts-node/register --require ./app/test/globals.ts app/test/unit/*.{ts,tsx} app/test/unit/**/*.{ts,tsx}",
"test": "yarn test:unit && yarn test:integration",
"cli":
"ts-node --require ./app/test/globals.ts --require ./app/src/cli/dev-commands-global.js app/src/cli/main.ts",
"test:integration":
"cross-env TEST_ENV=1 ELECTRON_NO_ATTACH_CONSOLE=1 xvfb-maybe mocha -t 30000 --compilers ts:ts-node/register,tsx:ts-node/register app/test/integration/*.ts",
"test:unit":
"cross-env GIT_AUTHOR_NAME=\"Joe Bloggs\" GIT_AUTHOR_EMAIL=\"[email protected]\" GIT_COMMITTER_NAME=\"Joe Bloggs\" GIT_COMMITTER_EMAIL=\"[email protected]\" TEST_ENV=1 ELECTRON_NO_ATTACH_CONSOLE=1 xvfb-maybe electron-mocha -t 10000 --renderer --compilers ts:ts-node/register,tsx:ts-node/register --require ./app/test/globals.ts app/test/unit/*.{ts,tsx} app/test/unit/**/*.{ts,tsx}",
"test": "npm run test:unit && npm run test:integration",
"test:setup": "ts-node script/test-setup.ts",
"test:review": "ts-node script/test-review.ts",
"postinstall": "cd app && npm install && cd .. && git submodule update --recursive --init && npm run compile:tslint && cd plugin && npm install",
"postinstall":
"cd app && npm install && cd .. && git submodule update --recursive --init && npm run compile:tslint && cd plugin && npm install",
"start": "cross-env NODE_ENV=development node script/start",
"start:prod": "cross-env NODE_ENV=production node script/start",
"debug": "cross-env NODE_ENV=development node script/debug",
"compile:plugin": "cd plugin && npm run build",
"compile:dev": "cross-env NODE_ENV=development parallel-webpack --config app/webpack.development.js && npm run compile:plugin",
"compile:prod": "cross-env NODE_ENV=production parallel-webpack --config app/webpack.production.js && npm run compile:plugin",
"build:dev": "npm run compile:dev && cross-env NODE_ENV=development ts-node script/build.ts",
"build:prod": "npm run compile:prod && cross-env NODE_ENV=production ts-node script/build.ts",
"compile:dev":
"cross-env NODE_ENV=development parallel-webpack --config app/webpack.development.js && npm run compile:plugin",
"compile:prod":
"cross-env NODE_ENV=production parallel-webpack --config app/webpack.production.js && npm run compile:plugin",
"build:dev":
"npm run compile:dev && cross-env NODE_ENV=development ts-node script/build.ts",
"build:prod":
"npm run compile:prod && cross-env NODE_ENV=production ts-node script/build.ts",
"package": "ts-node script/package",
"generate-octicons": "ts-node script/generate-octicons.ts",
"clean:tslint": "rimraf tslint-rules/*.js",
"compile:tslint": "tsc -p tslint-rules",
"lint": "yarn compile:tslint && yarn tslint && yarn eslint-check && yarn eslint",
"tslint": "tslint ./{scripts,tslint-rules}/*.ts ./app/{src,typings,test}/**/*.{ts,tsx}",
"lint":
"npm run compile:tslint && npm run tslint && npm run eslint-check && npm run eslint",
"tslint":
"tslint ./{scripts,tslint-rules}/*.ts ./app/{src,typings,test}/**/*.{ts,tsx}",
"eslint": "ts-node script/eslint.ts",
"eslint:fix": "ts-node script/eslint.ts --fix",
"eslint-check": "eslint --print-config .eslintrc.* | eslint-config-prettier-check",
"eslint-check":
"eslint --print-config .eslintrc.* | eslint-config-prettier-check",
"publish": "node script/publish",
"clean-slate": "rimraf out node_modules app/node_modules && yarn",
"rebuild-hard:dev": "yarn clean-slate && yarn build:dev",
"rebuild-hard:prod": "yarn clean-slate && yarn build:prod"
"clean-slate": "rimraf out node_modules app/node_modules",
"rebuild-hard:dev": "npm run clean-slate && npm run build:dev",
"rebuild-hard:prod": "npm run clean-slate && npm run build:prod"
},
"author": {
"name": "Mathieu Dutour",
Expand Down
2 changes: 1 addition & 1 deletion script/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const onExit = process.on.bind(process, 'exit') as ProcessOnExit
onExit(code => {
if (code && ESLINT_ARGS.indexOf('--fix') === -1) {
console.error(
chalk`{bold.green → To fix some of these errors, run {underline yarn eslint:fix}}`
chalk`{bold.green → To fix some of these errors, run {underline npm run eslint:fix}}`
)
}
})
2 changes: 1 addition & 1 deletion script/publish
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const token = process.env.KACTUSBOT_TOKEN
const repo = 'kactus-io/kactus'

console.log('Packaging…')
cp.execSync('yarn package')
cp.execSync('npm run package')

let uploadPromise = null
if (process.platform === 'darwin') {
Expand Down
2 changes: 1 addition & 1 deletion script/start
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function startApp() {
const runningApp = run({ stdio: 'inherit' })
if (!runningApp) {
console.error(
"Couldn't launch the app. You probably need to build it first. Run `yarn build:dev`."
"Couldn't launch the app. You probably need to build it first. Run `npm run build:dev`."
)
process.exit(1)
}
Expand Down

0 comments on commit f2c3eff

Please sign in to comment.