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>
This commit is contained in:
Sebastian Markbåge 2023-02-21 14:18:21 -05:00 committed by GitHub
parent 60144a04da
commit c8d4eeda5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 38 additions and 38 deletions

View File

@ -366,7 +366,7 @@ jobs:
RELEASE_CHANNEL: stable RELEASE_CHANNEL: stable
working_directory: fixtures/dom working_directory: fixtures/dom
command: | command: |
yarn prestart yarn predev
yarn test --maxWorkers=2 yarn test --maxWorkers=2
test_fuzz: test_fuzz:

View File

@ -8,7 +8,7 @@
## Instructions ## Instructions
`yarn build --type=UMD_DEV react/index,react-dom && cd fixtures/attribute-behavior && yarn install && yarn start` `yarn build --type=UMD_DEV react/index,react-dom && cd fixtures/attribute-behavior && yarn install && yarn dev`
## Interpretation ## Interpretation

View File

@ -11,9 +11,9 @@
"react-virtualized": "^9.9.0" "react-virtualized": "^9.9.0"
}, },
"scripts": { "scripts": {
"prestart": "predev":
"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/", "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/",
"start": "react-scripts start", "dev": "react-scripts start",
"build": "react-scripts build", "build": "react-scripts build",
"test": "react-scripts test --env=jsdom", "test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject" "eject": "react-scripts eject"

View File

@ -12,7 +12,7 @@
}, },
"scripts": { "scripts": {
"copy-source": "cp -r ../../../build/oss-experimental/* ./node_modules/", "copy-source": "cp -r ../../../build/oss-experimental/* ./node_modules/",
"start": "react-scripts start", "dev": "react-scripts start",
"build": "react-scripts build", "build": "react-scripts build",
"test": "react-scripts test --env=jsdom", "test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject" "eject": "react-scripts eject"

View File

@ -19,8 +19,8 @@
"semver": "^5.5.0" "semver": "^5.5.0"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "dev": "react-scripts start",
"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", "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",
"build": "react-scripts build && cp build/index.html build/200.html", "build": "react-scripts build && cp build/index.html build/200.html",
"test": "react-scripts test --env=jsdom", "test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject" "eject": "react-scripts eject"

View File

@ -8,9 +8,9 @@
"react-scripts": "1.0.17" "react-scripts": "1.0.17"
}, },
"scripts": { "scripts": {
"prestart": "predev":
"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/umd/react.development.js public/ && cp ../../build/oss-experimental/react-dom/umd/react-dom.development.js public/",
"start": "react-scripts start", "dev": "react-scripts start",
"build": "react-scripts build", "build": "react-scripts build",
"test": "react-scripts test --env=jsdom", "test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject" "eject": "react-scripts eject"

View File

@ -12,7 +12,7 @@
"react-motion": "^0.5.0" "react-motion": "^0.5.0"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "dev": "react-scripts start",
"build": "react-scripts build" "build": "react-scripts build"
} }
} }

View File

@ -28,12 +28,12 @@
"prettier": "1.19.1" "prettier": "1.19.1"
}, },
"scripts": { "scripts": {
"start": "concurrently \"npm run server:dev\" \"npm run bundler:dev\"", "dev": "concurrently \"npm run dev:server\" \"npm run dev:bundler\"",
"start:prod": "concurrently \"npm run server:prod\" \"npm run bundler:prod\"", "start": "concurrently \"npm run start:server\" \"npm run start:bundler\"",
"server:dev": "cross-env NODE_ENV=development nodemon -- --inspect server/server.js", "dev:server": "cross-env NODE_ENV=development nodemon -- --inspect server/server.js",
"server:prod": "cross-env NODE_ENV=production nodemon -- server/server.js", "start:server": "cross-env NODE_ENV=production nodemon -- server/server.js",
"bundler:dev": "cross-env NODE_ENV=development nodemon -- scripts/build.js", "dev:bundler": "cross-env NODE_ENV=development nodemon -- scripts/build.js",
"bundler:prod": "cross-env NODE_ENV=production nodemon -- scripts/build.js" "start:bundler": "cross-env NODE_ENV=production nodemon -- scripts/build.js"
}, },
"babel": { "babel": {
"presets": [ "presets": [

View File

@ -63,14 +63,14 @@
"workbox-webpack-plugin": "^6.4.1" "workbox-webpack-plugin": "^6.4.1"
}, },
"scripts": { "scripts": {
"prestart": "cp -r ../../build/oss-experimental/* ./node_modules/", "predev": "cp -r ../../build/oss-experimental/* ./node_modules/",
"prebuild": "cp -r ../../build/oss-experimental/* ./node_modules/", "prebuild": "cp -r ../../build/oss-experimental/* ./node_modules/",
"start": "concurrently \"npm run start:server\" \"npm run start:client\"", "dev": "concurrently \"npm run dev:server\" \"npm run dev:client\"",
"start:client": "NODE_ENV=development BUILD_PATH=dist node scripts/start.js", "dev:client": "NODE_ENV=development BUILD_PATH=dist node scripts/start.js",
"start:server": "NODE_ENV=development BUILD_PATH=dist nodemon -- --experimental-loader ./loader/index.js --conditions=react-server server", "dev:server": "NODE_ENV=development BUILD_PATH=dist nodemon -- --experimental-loader ./loader/index.js --conditions=react-server server",
"start:prod": "node scripts/build.js && concurrently \"npm run start:prod-server\" \"npm run start:prod-client\"", "start": "node scripts/build.js && concurrently \"npm run start:server\" \"npm run start:client\"",
"start:prod-client": "cd ./build && python -m SimpleHTTPServer 3000", "start:client": "cd ./build && python3 -m http.server 3000",
"start:prod-server": "NODE_ENV=production node --experimental-loader ./loader/index.js --conditions=react-server server", "start:server": "NODE_ENV=production node --experimental-loader ./loader/index.js --conditions=react-server server",
"build": "node scripts/build.js", "build": "node scripts/build.js",
"test": "node scripts/test.js --env=jsdom" "test": "node scripts/test.js --env=jsdom"
}, },

View File

@ -15,9 +15,9 @@
"watch:legacy": "cpx 'src/shared/**' 'src/legacy/shared/' --watch --no-initial", "watch:legacy": "cpx 'src/shared/**' 'src/legacy/shared/' --watch --no-initial",
"watch:modern": "cpx 'src/shared/**' 'src/modern/shared/' --watch --no-initial", "watch:modern": "cpx 'src/shared/**' 'src/modern/shared/' --watch --no-initial",
"prebuild": "run-p copy:*", "prebuild": "run-p copy:*",
"prestart": "run-p copy:*", "predev": "run-p copy:*",
"start": "run-p start-app watch:*", "dev": "run-p dev-app watch:*",
"start-app": "react-scripts start", "dev-app": "react-scripts start",
"build": "react-scripts build", "build": "react-scripts build",
"eject": "react-scripts eject" "eject": "react-scripts eject"
}, },

View File

@ -16,10 +16,10 @@
"react-dom": "link:../../build/oss-experimental/react-dom" "react-dom": "link:../../build/oss-experimental/react-dom"
}, },
"scripts": { "scripts": {
"start": "concurrently \"npm run start:server\" \"npm run start:client\"", "dev": "concurrently \"npm run dev:server\" \"npm run dev:client\"",
"start:client": "PORT=3001 react-scripts start", "dev:client": "PORT=3001 react-scripts start",
"start:server": "NODE_ENV=development node server", "dev:server": "NODE_ENV=development node server",
"start:prod": "react-scripts build && NODE_ENV=production node server", "start": "react-scripts build && NODE_ENV=production node server",
"build": "react-scripts build", "build": "react-scripts build",
"test": "react-scripts test --env=jsdom", "test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject" "eject": "react-scripts eject"

View File

@ -28,12 +28,12 @@
"prettier": "1.19.1" "prettier": "1.19.1"
}, },
"scripts": { "scripts": {
"start": "concurrently \"npm run server:dev\" \"npm run bundler:dev\"", "dev": "concurrently \"npm run dev:server\" \"npm run dev:bundler\"",
"start:prod": "concurrently \"npm run server:prod\" \"npm run bundler:prod\"", "start": "concurrently \"npm run start:server\" \"npm run start:bundler\"",
"server:dev": "cross-env NODE_ENV=development nodemon -- server/server.js", "dev:server": "cross-env NODE_ENV=development nodemon -- server/server.js",
"server:prod": "cross-env NODE_ENV=production nodemon -- server/server.js", "start:server": "cross-env NODE_ENV=production nodemon -- server/server.js",
"bundler:dev": "cross-env NODE_ENV=development nodemon -- scripts/build.js", "dev:bundler": "cross-env NODE_ENV=development nodemon -- scripts/build.js",
"bundler:prod": "cross-env NODE_ENV=production nodemon -- scripts/build.js" "start:bundler": "cross-env NODE_ENV=production nodemon -- scripts/build.js"
}, },
"babel": { "babel": {
"presets": [ "presets": [

View File

@ -1,7 +1,7 @@
[build] [build]
base = "" base = ""
publish = "fixtures/dom/build" publish = "fixtures/dom/build"
command = "yarn build --type=UMD_DEV && cd fixtures/dom/ && yarn && yarn prestart && yarn build" command = "yarn build --type=UMD_DEV && cd fixtures/dom/ && yarn && yarn predev && yarn build"
[[redirects]] [[redirects]]
from = "/*" from = "/*"

View File

@ -135,7 +135,7 @@
"test-build-prod": "yarn test --deprecated 'yarn test --build --prod'", "test-build-prod": "yarn test --deprecated 'yarn test --build --prod'",
"test-build-devtools": "node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental", "test-build-devtools": "node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental",
"debug-test-build-devtools": "yarn test --deprecated 'yarn test-build-devtools --debug'", "debug-test-build-devtools": "yarn test --deprecated 'yarn test-build-devtools --debug'",
"test-dom-fixture": "cd fixtures/dom && yarn && yarn prestart && yarn test", "test-dom-fixture": "cd fixtures/dom && yarn && yarn predev && yarn test",
"flow": "node ./scripts/tasks/flow.js", "flow": "node ./scripts/tasks/flow.js",
"flow-ci": "node ./scripts/tasks/flow-ci.js", "flow-ci": "node ./scripts/tasks/flow-ci.js",
"prettier": "node ./scripts/prettier/index.js write-changed", "prettier": "node ./scripts/prettier/index.js write-changed",