Skip to content

Commit c8d4eed

Browse files
sebmarkbageeps1lon
andauthored
Rename yarn start to yarn dev and yarn start:prod to yarn start (#26209)
The `start` convention is a CRA convention but nobody else of the modern frameworks / tools use this convention for a file watcher and dev mode. Instead the common convention is `dev`. Instead `start` is for running a production build that's already been built. --------- Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
1 parent 60144a0 commit c8d4eed

File tree

14 files changed

+38
-38
lines changed

14 files changed

+38
-38
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ jobs:
366366
RELEASE_CHANNEL: stable
367367
working_directory: fixtures/dom
368368
command: |
369-
yarn prestart
369+
yarn predev
370370
yarn test --maxWorkers=2
371371
372372
test_fuzz:

fixtures/attribute-behavior/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## Instructions
1010

11-
`yarn build --type=UMD_DEV react/index,react-dom && cd fixtures/attribute-behavior && yarn install && yarn start`
11+
`yarn build --type=UMD_DEV react/index,react-dom && cd fixtures/attribute-behavior && yarn install && yarn dev`
1212

1313
## Interpretation
1414

fixtures/attribute-behavior/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"react-virtualized": "^9.9.0"
1212
},
1313
"scripts": {
14-
"prestart":
14+
"predev":
1515
"cp ../../build/oss-experimental/react/umd/react.development.js public/ && cp ../../build/oss-experimental/react-dom/umd/react-dom.development.js public/ && cp ../../build/oss-experimental/react-dom/umd/react-dom-server-legacy.browser.development.js public/",
16-
"start": "react-scripts start",
16+
"dev": "react-scripts start",
1717
"build": "react-scripts build",
1818
"test": "react-scripts test --env=jsdom",
1919
"eject": "react-scripts eject"

fixtures/concurrent/time-slicing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"scripts": {
1414
"copy-source": "cp -r ../../../build/oss-experimental/* ./node_modules/",
15-
"start": "react-scripts start",
15+
"dev": "react-scripts start",
1616
"build": "react-scripts build",
1717
"test": "react-scripts test --env=jsdom",
1818
"eject": "react-scripts eject"

fixtures/dom/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"semver": "^5.5.0"
2020
},
2121
"scripts": {
22-
"start": "react-scripts start",
23-
"prestart": "cp ../../build/oss-stable/scheduler/umd/scheduler-unstable_mock.development.js ../../build/oss-stable/scheduler/umd/scheduler-unstable_mock.production.min.js ../../build/oss-stable/react/umd/react.development.js ../../build/oss-stable/react-dom/umd/react-dom.development.js ../../build/oss-stable/react/umd/react.production.min.js ../../build/oss-stable/react-dom/umd/react-dom.production.min.js ../../build/oss-stable/react-dom/umd/react-dom-server.browser.development.js ../../build/oss-stable/react-dom/umd/react-dom-server.browser.production.min.js ../../build/oss-stable/react-dom/umd/react-dom-test-utils.development.js ../../build/oss-stable/react-dom/umd/react-dom-test-utils.production.min.js public/ && cp -a ../../build/oss-stable/. node_modules",
22+
"dev": "react-scripts start",
23+
"predev": "cp ../../build/oss-stable/scheduler/umd/scheduler-unstable_mock.development.js ../../build/oss-stable/scheduler/umd/scheduler-unstable_mock.production.min.js ../../build/oss-stable/react/umd/react.development.js ../../build/oss-stable/react-dom/umd/react-dom.development.js ../../build/oss-stable/react/umd/react.production.min.js ../../build/oss-stable/react-dom/umd/react-dom.production.min.js ../../build/oss-stable/react-dom/umd/react-dom-server.browser.development.js ../../build/oss-stable/react-dom/umd/react-dom-server.browser.production.min.js ../../build/oss-stable/react-dom/umd/react-dom-test-utils.development.js ../../build/oss-stable/react-dom/umd/react-dom-test-utils.production.min.js public/ && cp -a ../../build/oss-stable/. node_modules",
2424
"build": "react-scripts build && cp build/index.html build/200.html",
2525
"test": "react-scripts test --env=jsdom",
2626
"eject": "react-scripts eject"

fixtures/expiration/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"react-scripts": "1.0.17"
99
},
1010
"scripts": {
11-
"prestart":
11+
"predev":
1212
"cp ../../build/oss-experimental/react/umd/react.development.js public/ && cp ../../build/oss-experimental/react-dom/umd/react-dom.development.js public/",
13-
"start": "react-scripts start",
13+
"dev": "react-scripts start",
1414
"build": "react-scripts build",
1515
"test": "react-scripts test --env=jsdom",
1616
"eject": "react-scripts eject"

fixtures/fiber-debugger/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"react-motion": "^0.5.0"
1313
},
1414
"scripts": {
15-
"start": "react-scripts start",
15+
"dev": "react-scripts start",
1616
"build": "react-scripts build"
1717
}
1818
}

fixtures/fizz/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
"prettier": "1.19.1"
2929
},
3030
"scripts": {
31-
"start": "concurrently \"npm run server:dev\" \"npm run bundler:dev\"",
32-
"start:prod": "concurrently \"npm run server:prod\" \"npm run bundler:prod\"",
33-
"server:dev": "cross-env NODE_ENV=development nodemon -- --inspect server/server.js",
34-
"server:prod": "cross-env NODE_ENV=production nodemon -- server/server.js",
35-
"bundler:dev": "cross-env NODE_ENV=development nodemon -- scripts/build.js",
36-
"bundler:prod": "cross-env NODE_ENV=production nodemon -- scripts/build.js"
31+
"dev": "concurrently \"npm run dev:server\" \"npm run dev:bundler\"",
32+
"start": "concurrently \"npm run start:server\" \"npm run start:bundler\"",
33+
"dev:server": "cross-env NODE_ENV=development nodemon -- --inspect server/server.js",
34+
"start:server": "cross-env NODE_ENV=production nodemon -- server/server.js",
35+
"dev:bundler": "cross-env NODE_ENV=development nodemon -- scripts/build.js",
36+
"start:bundler": "cross-env NODE_ENV=production nodemon -- scripts/build.js"
3737
},
3838
"babel": {
3939
"presets": [

fixtures/flight/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@
6363
"workbox-webpack-plugin": "^6.4.1"
6464
},
6565
"scripts": {
66-
"prestart": "cp -r ../../build/oss-experimental/* ./node_modules/",
66+
"predev": "cp -r ../../build/oss-experimental/* ./node_modules/",
6767
"prebuild": "cp -r ../../build/oss-experimental/* ./node_modules/",
68-
"start": "concurrently \"npm run start:server\" \"npm run start:client\"",
69-
"start:client": "NODE_ENV=development BUILD_PATH=dist node scripts/start.js",
70-
"start:server": "NODE_ENV=development BUILD_PATH=dist nodemon -- --experimental-loader ./loader/index.js --conditions=react-server server",
71-
"start:prod": "node scripts/build.js && concurrently \"npm run start:prod-server\" \"npm run start:prod-client\"",
72-
"start:prod-client": "cd ./build && python -m SimpleHTTPServer 3000",
73-
"start:prod-server": "NODE_ENV=production node --experimental-loader ./loader/index.js --conditions=react-server server",
68+
"dev": "concurrently \"npm run dev:server\" \"npm run dev:client\"",
69+
"dev:client": "NODE_ENV=development BUILD_PATH=dist node scripts/start.js",
70+
"dev:server": "NODE_ENV=development BUILD_PATH=dist nodemon -- --experimental-loader ./loader/index.js --conditions=react-server server",
71+
"start": "node scripts/build.js && concurrently \"npm run start:server\" \"npm run start:client\"",
72+
"start:client": "cd ./build && python3 -m http.server 3000",
73+
"start:server": "NODE_ENV=production node --experimental-loader ./loader/index.js --conditions=react-server server",
7474
"build": "node scripts/build.js",
7575
"test": "node scripts/test.js --env=jsdom"
7676
},

fixtures/nesting/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"watch:legacy": "cpx 'src/shared/**' 'src/legacy/shared/' --watch --no-initial",
1616
"watch:modern": "cpx 'src/shared/**' 'src/modern/shared/' --watch --no-initial",
1717
"prebuild": "run-p copy:*",
18-
"prestart": "run-p copy:*",
19-
"start": "run-p start-app watch:*",
20-
"start-app": "react-scripts start",
18+
"predev": "run-p copy:*",
19+
"dev": "run-p dev-app watch:*",
20+
"dev-app": "react-scripts start",
2121
"build": "react-scripts build",
2222
"eject": "react-scripts eject"
2323
},

fixtures/ssr/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"react-dom": "link:../../build/oss-experimental/react-dom"
1717
},
1818
"scripts": {
19-
"start": "concurrently \"npm run start:server\" \"npm run start:client\"",
20-
"start:client": "PORT=3001 react-scripts start",
21-
"start:server": "NODE_ENV=development node server",
22-
"start:prod": "react-scripts build && NODE_ENV=production node server",
19+
"dev": "concurrently \"npm run dev:server\" \"npm run dev:client\"",
20+
"dev:client": "PORT=3001 react-scripts start",
21+
"dev:server": "NODE_ENV=development node server",
22+
"start": "react-scripts build && NODE_ENV=production node server",
2323
"build": "react-scripts build",
2424
"test": "react-scripts test --env=jsdom",
2525
"eject": "react-scripts eject"

fixtures/ssr2/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
"prettier": "1.19.1"
2929
},
3030
"scripts": {
31-
"start": "concurrently \"npm run server:dev\" \"npm run bundler:dev\"",
32-
"start:prod": "concurrently \"npm run server:prod\" \"npm run bundler:prod\"",
33-
"server:dev": "cross-env NODE_ENV=development nodemon -- server/server.js",
34-
"server:prod": "cross-env NODE_ENV=production nodemon -- server/server.js",
35-
"bundler:dev": "cross-env NODE_ENV=development nodemon -- scripts/build.js",
36-
"bundler:prod": "cross-env NODE_ENV=production nodemon -- scripts/build.js"
31+
"dev": "concurrently \"npm run dev:server\" \"npm run dev:bundler\"",
32+
"start": "concurrently \"npm run start:server\" \"npm run start:bundler\"",
33+
"dev:server": "cross-env NODE_ENV=development nodemon -- server/server.js",
34+
"start:server": "cross-env NODE_ENV=production nodemon -- server/server.js",
35+
"dev:bundler": "cross-env NODE_ENV=development nodemon -- scripts/build.js",
36+
"start:bundler": "cross-env NODE_ENV=production nodemon -- scripts/build.js"
3737
},
3838
"babel": {
3939
"presets": [

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build]
22
base = ""
33
publish = "fixtures/dom/build"
4-
command = "yarn build --type=UMD_DEV && cd fixtures/dom/ && yarn && yarn prestart && yarn build"
4+
command = "yarn build --type=UMD_DEV && cd fixtures/dom/ && yarn && yarn predev && yarn build"
55

66
[[redirects]]
77
from = "/*"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
"test-build-prod": "yarn test --deprecated 'yarn test --build --prod'",
136136
"test-build-devtools": "node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental",
137137
"debug-test-build-devtools": "yarn test --deprecated 'yarn test-build-devtools --debug'",
138-
"test-dom-fixture": "cd fixtures/dom && yarn && yarn prestart && yarn test",
138+
"test-dom-fixture": "cd fixtures/dom && yarn && yarn predev && yarn test",
139139
"flow": "node ./scripts/tasks/flow.js",
140140
"flow-ci": "node ./scripts/tasks/flow-ci.js",
141141
"prettier": "node ./scripts/prettier/index.js write-changed",

0 commit comments

Comments
 (0)