Skip to content

Commit 64c5a86

Browse files
committed
Use yarn run for package.json scripts, add .eslintignore file and update README
1 parent a1ec4e6 commit 64c5a86

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/node_modules/*
2+
**/dist/*

README.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,19 @@ promise that future updates will not break your existing application.**
1111

1212
## Get started
1313

14-
If you have [yarn](https://github.com/yarnpkg/yarn) installed (recommended):
14+
Install (yarn)[https://github.com/yarnpkg/yarn] if you don't have it already:
1515
```
16-
yarn install
17-
npm start
16+
npm install -g yarn
1817
```
1918

20-
Otherwise:
19+
Then:
2120
```
22-
npm install
23-
npm start
21+
yarn install
22+
yarn start
2423
```
2524

2625
Direct your browser to `http://localhost:3000`.
2726

28-
2927
## Directory Structure
3028
```
3129
├── client
@@ -109,6 +107,14 @@ npm run test:all
109107

110108
This will run all files that are suffixed with a `.test.js`.
111109

110+
## Running ESLint
111+
112+
```
113+
npm run lint
114+
```
115+
116+
Check the `.eslintignore` file for directories excluded from linting.
117+
112118
## Changing the Asset Host
113119

114120
In production scenarios, you may want your assets to be hosted elsewhere besides

package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616
"npm": "3.x.x"
1717
},
1818
"scripts": {
19-
"start": "npm run dev:build && npm run dev:start",
20-
"dev:start": "npm run dev:start:client & npm run dev:start:server",
21-
"dev:start:server": "NODE_ENV=development $(npm bin)/nodemon server",
22-
"dev:start:client": "NODE_ENV=development $(npm bin)/babel-node webpack/development.hot",
23-
"dev:build": "NODE_ENV=development $(npm bin)/babel-node $(npm bin)/webpack --progress --colors --display-error-details --config webpack/development.js",
24-
"prod:build": "NODE_ENV=production $(npm bin)/babel-node $(npm bin)/webpack -p --optimize-dedupe --config webpack/production.js",
19+
"start": "yarn run dev:build && yarn run dev:start",
20+
"dev:start": "yarn run dev:start:client & yarn run dev:start:server",
21+
"dev:start:server": "NODE_ENV=development yarn run nodemon server",
22+
"dev:start:client": "NODE_ENV=development yarn run babel-node webpack/development.hot",
23+
"dev:build": "NODE_ENV=development $(yarn bin)/babel-node $(yarn bin)/webpack --progress --colors --display-error-details --config webpack/development.js",
24+
"prod:build": "NODE_ENV=production $(yarn bin)/babel-node $(yarn bin)/webpack -p --optimize-dedupe --config webpack/production.js",
2525
"prod:start": "NODE_ENV=production pm2 start server --name='callai'",
26-
"test": "$(npm bin)/mocha --recursive --compilers js:babel-register",
27-
"test:all": "$(npm bin)/mocha --recursive --compilers js:babel-register $(find . -path ./node_modules -prune -o -name '*.test.js' -print)",
26+
"test": "yarn run mocha --recursive --compilers js:babel-register",
27+
"test:all": "yarn run mocha --recursive --compilers js:babel-register $(find . -path ./node_modules -prune -o -name '*.test.js' -print)",
2828
"test:watch": "npm test -- --watch",
29-
"test:all:watch": "$(npm bin)/mocha --recursive --compilers js:babel-register $(find . -path ./node_modules -prune -o -name '*.test.js' -print) --watch",
30-
"lint": "$(npm bin)/eslint --ignore-pattern **/node_modules/* --ext .js,.jsx .",
31-
"postinstall": "if [ \"$NODE_ENV\" = \"production\" ]; then npm run prod:build; fi"
29+
"test:all:watch": "yarn run mocha --recursive --compilers js:babel-register $(find . -path ./node_modules -prune -o -name '*.test.js' -print) --watch",
30+
"lint": "yarn run eslint --ext .js,.jsx .",
31+
"postinstall": "if [ \"$NODE_ENV\" = \"production\" ]; then yarn run prod:build; fi"
3232
},
3333
"devDependencies": {
3434
"babel-eslint": "7.0.0",

0 commit comments

Comments
 (0)