Skip to content

Commit d744ff0

Browse files
committed
Misc
1 parent 119a33d commit d744ff0

File tree

15 files changed

+56
-21
lines changed

15 files changed

+56
-21
lines changed

Makefile

+4-6
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,16 @@ build-data-generator:
7474

7575
build: build-ra-core build-ra-ui-materialui build-react-admin build-ra-data-json-server build-ra-data-simple-rest build-ra-data-graphql build-ra-data-graphcool build-ra-data-graphql-simple build-ra-input-rich-text build-ra-realtime build-data-generator ## compile ES6 files to JS
7676

77-
watch: ## continuously compile ES6 files to JS
78-
@NODE_ENV=production ./node_modules/.bin/babel ./src -d lib --ignore spec.js,test.js --watch
79-
8077
doc: ## compile doc as html and launch doc web server
81-
@cd docs && jekyll server . --watch
78+
@yarn doc
8279

8380
lint: ## lint the code and check coding conventions
8481
@echo "Running linter..."
85-
@"./node_modules/.bin/eslint" ./packages/**/src
82+
@yarn lint
8683

8784
prettier: ## prettify the source code using prettier
88-
@./node_modules/.bin/prettier-eslint --write --list-different "packages/*/src/**/*.js" "examples/*/src/**/*.js"
85+
@echo "Running prettier..."
86+
@yarn prettier
8987

9088
test: build test-unit lint test-e2e ## launch all tests
9189

README.md

+23-2
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ You can run those example applications by calling:
157157
# At the react-admin project root
158158
make install
159159

160+
# or
161+
yarn install
162+
160163
# Run the simple application
161164
make run-simple
162165
# Run the tutorial application
@@ -177,20 +180,38 @@ You can run the tests (linting, unit and functional tests) by calling
177180
make test
178181
```
179182

180-
When working on the end to end tests, you can leverage [cypress](https://www.cypress.io/) runner by starting the simple example yourself (`make run-simple`) and starting cypress in another terminal (`make tests-e2e-local`).
183+
or
184+
185+
```sh
186+
yarn test
187+
```
188+
189+
When working on the end to end tests, you can leverage [cypress](https://www.cypress.io/) runner by starting the simple example yourself (`make run-simple`) and starting cypress in another terminal (`make test-e2e-local` or `yarn test-e2e-local`).
181190

182191
If you have coding standards problems, you can fix them automatically using `prettier` by calling
183192

184193
```sh
185194
make prettier
186195
```
187196

188-
If you want to contribute to the documentation, install jekyll, then call
197+
or
198+
199+
```sh
200+
yarn prettier
201+
```
202+
203+
If you want to contribute to the documentation, install [jekyll](https://jekyllrb.com/docs/home/), then call
189204

190205
```sh
191206
make doc
192207
```
193208

209+
or
210+
211+
```sh
212+
yarn doc
213+
```
214+
194215
And then browse to [http://localhost:4000/](http://localhost:4000/)
195216

196217
*Note*: if you have added a section with heading to the docs, you also have to add it to `docs/_layouts/default.html` (the links on the left) manually.

examples/data-generator/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"private": true,
55
"main": "./lib/index.js",
66
"scripts": {
7-
"build": "rimraf ./lib && NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js"
7+
"build": "rimraf ./lib && cross-env NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js",
8+
"watch": "rimraf ./lib && cross-env NODE_ENV=production babel --watch ./src -d ./lib --ignore spec.js,test.js"
89
},
910
"dependencies": {
1011
"babel-core": "~6.26.0",

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
"test-e2e": "npm run build && cross-env NODE_ENV=test && cd cypress && yarn test",
99
"test-e2e-local": "cd cypress && yarn start",
1010
"test": "yarn test-unit && yarn test-e2e",
11-
"test-ci": "yarn test-unit-ci && yarn test-e2e"
11+
"test-ci": "yarn test-unit-ci && yarn test-e2e",
12+
"doc": "cd docs && jekyll server . --watch",
13+
"lint": "eslint \" ./packages /**/src\"",
14+
"prettier": "prettier-eslint --write --list-different \"packages /*/src/**/*.js\" \"examples /*/src/**/*.js\""
1215
},
1316
"jest": {
1417
"setupTestFrameworkScriptFile": "./test-setup.js"
@@ -26,6 +29,7 @@
2629
"babel-preset-stage-0": "~6.24.1",
2730
"babel-register": "~6.26.0",
2831
"cheerio": "~1.0.0-rc.2",
32+
"cross-env": "^5.2.0",
2933
"eslint": "~4.19.1",
3034
"eslint-config-prettier": "~2.9.0",
3135
"eslint-plugin-cypress": "~2.0.1",

packages/ra-core/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"bugs": "https://github.com/marmelab/react-admin/issues",
1818
"license": "MIT",
1919
"scripts": {
20-
"build": "rimraf ./lib && NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js"
20+
"build": "rimraf ./lib && cross-env NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js",
21+
"watch": "rimraf ./lib && cross-env NODE_ENV=production babel --watch ./src -d ./lib --ignore spec.js,test.js"
2122
},
2223
"devDependencies": {
2324
"babel-cli": "~6.26.0",

packages/ra-data-fakerest/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
},
2929
"homepage": "https://github.com/marmelab/react-admin#readme",
3030
"scripts": {
31-
"build": "rimraf ./lib && NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js"
31+
"build": "rimraf ./lib && cross-env NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js",
32+
"watch": "rimraf ./lib && cross-env NODE_ENV=production babel --watch ./src -d ./lib --ignore spec.js,test.js"
3233
},
3334
"dependencies": {
3435
"fakerest": "~2.1.0"

packages/ra-data-graphcool/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
],
2626
"license": "MIT",
2727
"scripts": {
28-
"build": "rimraf ./lib && NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js"
28+
"build": "rimraf ./lib && cross-env NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js",
29+
"watch": "rimraf ./lib && cross-env NODE_ENV=production babel --watch ./src -d ./lib --ignore spec.js,test.js"
2930
},
3031
"dependencies": {
3132
"graphql-tag": "^2.6.1",

packages/ra-data-graphql-simple/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
],
2525
"license": "MIT",
2626
"scripts": {
27-
"build": "rimraf ./lib && NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js"
27+
"build": "rimraf ./lib && cross-env NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js",
28+
"watch": "rimraf ./lib && cross-env NODE_ENV=production babel --watch ./src -d ./lib --ignore spec.js,test.js"
2829
},
2930
"dependencies": {
3031
"graphql-tag": "^2.6.1",

packages/ra-data-graphql/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
],
2525
"license": "MIT",
2626
"scripts": {
27-
"build": "rimraf ./lib && NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js"
27+
"build": "rimraf ./lib && cross-env NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js",
28+
"watch": "rimraf ./lib && cross-env NODE_ENV=production babel --watch ./src -d ./lib --ignore spec.js,test.js"
2829
},
2930
"dependencies": {
3031
"apollo-client": "^2.2.8",

packages/ra-data-json-server/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"bugs": "https://github.com/marmelab/react-admin/issues",
1717
"license": "MIT",
1818
"scripts": {
19-
"build": "rimraf ./lib && NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js"
19+
"build": "rimraf ./lib && cross-env NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js",
20+
"watch": "rimraf ./lib && cross-env NODE_ENV=production babel --watch ./src -d ./lib --ignore spec.js,test.js"
2021
},
2122
"dependencies": {
2223
"query-string": "~5.1.1",

packages/ra-data-simple-rest/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"bugs": "https://github.com/marmelab/react-admin/issues",
1717
"license": "MIT",
1818
"scripts": {
19-
"build": "rimraf ./lib && NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js"
19+
"build": "rimraf ./lib && cross-env NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js",
20+
"watch": "rimraf ./lib && cross-env NODE_ENV=production babel --watch ./src -d ./lib --ignore spec.js,test.js"
2021
},
2122
"dependencies": {
2223
"query-string": "~5.1.1",

packages/ra-input-rich-text/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
},
3232
"homepage": "https://github.com/marmelab/react-admin#readme",
3333
"scripts": {
34-
"build": "rimraf ./lib && NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js"
34+
"build": "rimraf ./lib && cross-env NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js",
35+
"watch": "rimraf ./lib && cross-env NODE_ENV=production babel --watch ./src -d ./lib --ignore spec.js,test.js"
3536
},
3637
"peerDependencies": {
3738
"react": "~16.0.0 || ~16.1.0 || ~16.2.0 || ~16.3.0",

packages/ra-realtime/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
],
2525
"license": "MIT",
2626
"scripts": {
27-
"build": "rimraf ./lib && NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js"
27+
"build": "rimraf ./lib && cross-env NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js",
28+
"watch": "rimraf ./lib && cross-env NODE_ENV=production babel --watch ./src -d ./lib --ignore spec.js,test.js"
2829
},
2930
"dependencies": {
3031
"lodash": "~4.17.5"

packages/ra-ui-materialui/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"bugs": "https://github.com/marmelab/react-admin/issues",
1818
"license": "MIT",
1919
"scripts": {
20-
"build": "rimraf ./lib && NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js"
20+
"build": "rimraf ./lib && cross-env NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js",
21+
"watch": "rimraf ./lib && cross-env NODE_ENV=production babel --watch ./src -d ./lib --ignore spec.js,test.js"
2122
},
2223
"devDependencies": {
2324
"babel-cli": "~6.26.0",

packages/react-admin/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"bugs": "https://github.com/marmelab/react-admin/issues",
1818
"license": "MIT",
1919
"scripts": {
20-
"build": "rimraf ./lib && NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js"
20+
"build": "rimraf ./lib && cross-env NODE_ENV=production babel --quiet ./src -d ./lib --ignore spec.js,test.js",
21+
"watch": "rimraf ./lib && cross-env NODE_ENV=production babel --watch ./src -d ./lib --ignore spec.js,test.js"
2122
},
2223
"devDependencies": {
2324
"babel-cli": "~6.26.0",

0 commit comments

Comments
 (0)