Skip to content

Commit

Permalink
Refine npm scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
WellyShen committed Sep 16, 2016
1 parent 0de54de commit 51acd2f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog


### 1.1.2

> 2016-09-17
* Refine NPM scripts.


### 1.1.1

> 2016-09-15
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ I use [better-npm-run](https://github.com/benoror/better-npm-run) to manage the
`start`|Run your app on the development server at `localhost:3000`. HMR will be enabled.
`start:production`|Compiles the app to `./public/dist` and run it on the production server at `localhost:8080`.
`start:prod`|Run your app on the production server only at `localhost:8080`.
`build`|Clean the compiled stuff and compile your app to `./public/dist`.
`build:clean`|Remove the `./public/dist` folder to clean the compiled stuff.
`build`|Clean the previous compiled stuff and compile your app to `./public/dist`.
`lint`|Lint all `.js` and `.scss` files.
`lint:js`|Lint all `.js` files.
`lint:style`|Lint all `.scss` files.
`test`|Run testing once.
`test:watch`|Run testing on every test file change.
`test:clean`|Remove the `./coverage` folder to clean the code coverage report.
`clean:all`|Remove the `./public/dist` and the `./coverage` folder.
`clean:build`|Remove the `./public/dist` folder to clean the compiled stuff.
`clean:coverage`|Remove the `./coverage` folder to clean the code coverage report.

Note: If you get the the following message, try to run `npm run build` to fix it.

Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-cool-starter",
"version": "1.1.1",
"version": "1.1.2",
"description": "A starter boilerplate for an universal web application with the best development experience and best practices.",
"main": "index.js",
"engines": {
Expand Down Expand Up @@ -37,14 +37,15 @@
"start": "better-npm-run start",
"start:production": "npm run build && npm run start:prod",
"start:prod": "better-npm-run start:prod",
"build": "npm run build:clean && better-npm-run build",
"build:clean": "better-npm-run build:clean",
"build": "npm run clean:build && better-npm-run build",
"lint": "npm run lint:js && npm run lint:style",
"lint:js": "better-npm-run lint:js",
"lint:style": "better-npm-run lint:style",
"test": "better-npm-run test",
"test:watch": "npm test -- --no-single-run",
"test:clean": "better-npm-run test:clean",
"clean:all": "npm run clean:build && npm run clean:coverage",
"clean:build": "better-npm-run clean:build",
"clean:coverage": "better-npm-run clean:coverage",
"coveralls": "better-npm-run coveralls && npm run test:clean"
},
"betterScripts": {
Expand All @@ -71,9 +72,6 @@
"BABEL_ENV": "es"
}
},
"build:clean": {
"command": "rimraf ./public/dist"
},
"lint:js": {
"command": "eslint -c .eslintrc ./src ./tools ./index.js"
},
Expand All @@ -86,7 +84,10 @@
"NODE_ENV": "test"
}
},
"test:clean": {
"clean:build": {
"command": "rimraf ./public/dist"
},
"clean:coverage": {
"command": "rimraf ./coverage"
},
"coveralls": {
Expand Down

0 comments on commit 51acd2f

Please sign in to comment.