From c6e9bdbe177edde1cb4b6e88f16cdfe96a74c688 Mon Sep 17 00:00:00 2001 From: Ken Wheeler Date: Thu, 24 Jan 2019 14:26:13 -0500 Subject: [PATCH 1/5] saddling the js community with my personal preferences --- packages/create-react-app/createReactApp.js | 11 ++- packages/react-scripts/scripts/init.js | 3 +- .../react-scripts/template-wheeler/README.md | 68 ++++++++++++++++++ .../react-scripts/template-wheeler/gitignore | 23 ++++++ .../template-wheeler/public/favicon.ico | Bin 0 -> 3870 bytes .../template-wheeler/public/index.html | 41 +++++++++++ .../template-wheeler/public/manifest.json | 15 ++++ .../react-scripts/template-wheeler/src/App.js | 10 +++ .../template-wheeler/src/index.css | 9 +++ .../template-wheeler/src/index.js | 6 ++ 10 files changed, 182 insertions(+), 4 deletions(-) create mode 100644 packages/react-scripts/template-wheeler/README.md create mode 100644 packages/react-scripts/template-wheeler/gitignore create mode 100644 packages/react-scripts/template-wheeler/public/favicon.ico create mode 100644 packages/react-scripts/template-wheeler/public/index.html create mode 100644 packages/react-scripts/template-wheeler/public/manifest.json create mode 100644 packages/react-scripts/template-wheeler/src/App.js create mode 100644 packages/react-scripts/template-wheeler/src/index.css create mode 100644 packages/react-scripts/template-wheeler/src/index.js diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js index ff4beff99a2..2dca2e3a324 100755 --- a/packages/create-react-app/createReactApp.js +++ b/packages/create-react-app/createReactApp.js @@ -75,6 +75,7 @@ const program = new commander.Command(packageJson.name) '--scripts-version ', 'use a non-standard version of react-scripts' ) + .option('--wheeler-mode') .option('--use-npm') .option('--use-pnp') .option('--typescript') @@ -181,6 +182,7 @@ createApp( program.useNpm, program.usePnp, program.typescript, + program.wheelerMode, hiddenProgram.internalTestingTemplate ); @@ -191,6 +193,7 @@ function createApp( useNpm, usePnp, useTypescript, + wheelerMode, template ) { const root = path.resolve(name); @@ -283,7 +286,8 @@ function createApp( template, useYarn, usePnp, - useTypescript + useTypescript, + wheelerMode ); } @@ -367,10 +371,11 @@ function run( template, useYarn, usePnp, - useTypescript + useTypescript, + wheelerMode ) { const packageToInstall = getInstallPackage(version, originalDirectory); - const allDependencies = ['react', 'react-dom', packageToInstall]; + const allDependencies = !wheelerMode ? ['react', 'react-dom', packageToInstall] : ['react@next', 'react-dom@next', '@emotion/styled', packageToInstall]; if (useTypescript) { // TODO: get user's node version instead of installing latest allDependencies.push( diff --git a/packages/react-scripts/scripts/init.js b/packages/react-scripts/scripts/init.js index 9b473ab3d95..c3e2acb296a 100644 --- a/packages/react-scripts/scripts/init.js +++ b/packages/react-scripts/scripts/init.js @@ -92,6 +92,7 @@ module.exports = function( appPackage.dependencies = appPackage.dependencies || {}; const useTypeScript = appPackage.dependencies['typescript'] != null; + const wheelerMode = appPackage.dependencies['emotion'] != null; // Setup the script rules appPackage.scripts = { @@ -125,7 +126,7 @@ module.exports = function( // Copy the files for the user const templatePath = template ? path.resolve(originalDirectory, template) - : path.join(ownPath, useTypeScript ? 'template-typescript' : 'template'); + : path.join(ownPath, useTypeScript ? 'template-typescript' : wheelerMode ? 'template-wheeler' : 'template'); if (fs.existsSync(templatePath)) { fs.copySync(templatePath, appPath); } else { diff --git a/packages/react-scripts/template-wheeler/README.md b/packages/react-scripts/template-wheeler/README.md new file mode 100644 index 00000000000..9d9614c4fd3 --- /dev/null +++ b/packages/react-scripts/template-wheeler/README.md @@ -0,0 +1,68 @@ +This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). + +## Available Scripts + +In the project directory, you can run: + +### `npm start` + +Runs the app in the development mode.
+Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.
+You will also see any lint errors in the console. + +### `npm test` + +Launches the test runner in the interactive watch mode.
+See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder.
+It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.
+Your app is ready to be deployed! + +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. + +### `npm run eject` + +**Note: this is a one-way operation. Once you `eject`, you can’t go back!** + +If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. + +Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. + +You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. + +## Learn More + +You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). + +To learn React, check out the [React documentation](https://reactjs.org/). + +### Code Splitting + +This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting + +### Analyzing the Bundle Size + +This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size + +### Making a Progressive Web App + +This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app + +### Advanced Configuration + +This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration + +### Deployment + +This section has moved here: https://facebook.github.io/create-react-app/docs/deployment + +### `npm run build` fails to minify + +This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify diff --git a/packages/react-scripts/template-wheeler/gitignore b/packages/react-scripts/template-wheeler/gitignore new file mode 100644 index 00000000000..4d29575de80 --- /dev/null +++ b/packages/react-scripts/template-wheeler/gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/packages/react-scripts/template-wheeler/public/favicon.ico b/packages/react-scripts/template-wheeler/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a11777cc471a4344702741ab1c8a588998b1311a GIT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template-wheeler/public/index.html new file mode 100644 index 00000000000..323182f3920 --- /dev/null +++ b/packages/react-scripts/template-wheeler/public/index.html @@ -0,0 +1,41 @@ + + + + + + + + + + + React App + + + +
+ + + diff --git a/packages/react-scripts/template-wheeler/public/manifest.json b/packages/react-scripts/template-wheeler/public/manifest.json new file mode 100644 index 00000000000..1f2f141fafd --- /dev/null +++ b/packages/react-scripts/template-wheeler/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/packages/react-scripts/template-wheeler/src/App.js b/packages/react-scripts/template-wheeler/src/App.js new file mode 100644 index 00000000000..0d3f4c1dfd8 --- /dev/null +++ b/packages/react-scripts/template-wheeler/src/App.js @@ -0,0 +1,10 @@ +import React from 'react'; +import styled from '@emotion/styled' + +const Message = styled.h1` + font-weight: italic; +`; + +export default function App() { + return Let's Party; +} diff --git a/packages/react-scripts/template-wheeler/src/index.css b/packages/react-scripts/template-wheeler/src/index.css new file mode 100644 index 00000000000..df48d667085 --- /dev/null +++ b/packages/react-scripts/template-wheeler/src/index.css @@ -0,0 +1,9 @@ +body { + margin: 0; + padding: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", + "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} diff --git a/packages/react-scripts/template-wheeler/src/index.js b/packages/react-scripts/template-wheeler/src/index.js new file mode 100644 index 00000000000..b737346c4dd --- /dev/null +++ b/packages/react-scripts/template-wheeler/src/index.js @@ -0,0 +1,6 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import './index.css'; +import App from './App'; + +ReactDOM.createRoot(document.getElementById('root')).render(); From 4b74c91223527de1de13ea947ea68ca1669aadaf Mon Sep 17 00:00:00 2001 From: Ken Wheeler Date: Thu, 24 Jan 2019 14:27:13 -0500 Subject: [PATCH 2/5] whoopsie doo --- packages/react-scripts/scripts/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/scripts/init.js b/packages/react-scripts/scripts/init.js index c3e2acb296a..6feb89c46fd 100644 --- a/packages/react-scripts/scripts/init.js +++ b/packages/react-scripts/scripts/init.js @@ -92,7 +92,7 @@ module.exports = function( appPackage.dependencies = appPackage.dependencies || {}; const useTypeScript = appPackage.dependencies['typescript'] != null; - const wheelerMode = appPackage.dependencies['emotion'] != null; + const wheelerMode = appPackage.dependencies['@emotion/styled'] != null; // Setup the script rules appPackage.scripts = { From 116ec7728586f69f22ae93e4bed24c510366de5c Mon Sep 17 00:00:00 2001 From: Ken Wheeler Date: Thu, 24 Jan 2019 16:28:25 -0500 Subject: [PATCH 3/5] being reasonable --- packages/create-react-app/createReactApp.js | 16 ++++++++++------ packages/react-scripts/scripts/init.js | 11 +++++++---- .../README.md | 0 .../gitignore | 0 .../public/favicon.ico | Bin .../public/index.html | 0 .../public/manifest.json | 0 .../react-scripts/template-minimal/src/App.js | 5 +++++ .../src/index.css | 0 .../src/index.js | 0 .../react-scripts/template-wheeler/src/App.js | 10 ---------- 11 files changed, 22 insertions(+), 20 deletions(-) rename packages/react-scripts/{template-wheeler => template-minimal}/README.md (100%) rename packages/react-scripts/{template-wheeler => template-minimal}/gitignore (100%) rename packages/react-scripts/{template-wheeler => template-minimal}/public/favicon.ico (100%) rename packages/react-scripts/{template-wheeler => template-minimal}/public/index.html (100%) rename packages/react-scripts/{template-wheeler => template-minimal}/public/manifest.json (100%) create mode 100644 packages/react-scripts/template-minimal/src/App.js rename packages/react-scripts/{template-wheeler => template-minimal}/src/index.css (100%) rename packages/react-scripts/{template-wheeler => template-minimal}/src/index.js (100%) delete mode 100644 packages/react-scripts/template-wheeler/src/App.js diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js index 2dca2e3a324..86bf3376346 100755 --- a/packages/create-react-app/createReactApp.js +++ b/packages/create-react-app/createReactApp.js @@ -75,10 +75,10 @@ const program = new commander.Command(packageJson.name) '--scripts-version ', 'use a non-standard version of react-scripts' ) - .option('--wheeler-mode') .option('--use-npm') .option('--use-pnp') .option('--typescript') + .option('-m, --minimal') .allowUnknownOption() .on('--help', () => { console.log(` Only ${chalk.green('')} is required.`); @@ -182,7 +182,7 @@ createApp( program.useNpm, program.usePnp, program.typescript, - program.wheelerMode, + program.minimal, hiddenProgram.internalTestingTemplate ); @@ -193,7 +193,7 @@ function createApp( useNpm, usePnp, useTypescript, - wheelerMode, + minimal, template ) { const root = path.resolve(name); @@ -287,7 +287,7 @@ function createApp( useYarn, usePnp, useTypescript, - wheelerMode + minimal ); } @@ -372,10 +372,10 @@ function run( useYarn, usePnp, useTypescript, - wheelerMode + minimal ) { const packageToInstall = getInstallPackage(version, originalDirectory); - const allDependencies = !wheelerMode ? ['react', 'react-dom', packageToInstall] : ['react@next', 'react-dom@next', '@emotion/styled', packageToInstall]; + const allDependencies = !minimal ? ['react', 'react-dom', packageToInstall] : ['react@next', 'react-dom@next', packageToInstall]; if (useTypescript) { // TODO: get user's node version instead of installing latest allDependencies.push( @@ -387,6 +387,10 @@ function run( ); } + if (minimal) { + template = 'minimal'; + } + console.log('Installing packages. This might take a couple of minutes.'); getPackageName(packageToInstall) .then(packageName => diff --git a/packages/react-scripts/scripts/init.js b/packages/react-scripts/scripts/init.js index 6feb89c46fd..591aae80d7e 100644 --- a/packages/react-scripts/scripts/init.js +++ b/packages/react-scripts/scripts/init.js @@ -92,7 +92,6 @@ module.exports = function( appPackage.dependencies = appPackage.dependencies || {}; const useTypeScript = appPackage.dependencies['typescript'] != null; - const wheelerMode = appPackage.dependencies['@emotion/styled'] != null; // Setup the script rules appPackage.scripts = { @@ -123,10 +122,14 @@ module.exports = function( ); } + // Copy the files for the user - const templatePath = template - ? path.resolve(originalDirectory, template) - : path.join(ownPath, useTypeScript ? 'template-typescript' : wheelerMode ? 'template-wheeler' : 'template'); + const templatePath = template + ? template === 'minimal' + ? path.join(ownPath, 'template-minimal') + : path.resolve(originalDirectory, template) + : path.join(ownPath, useTypeScript ? 'template-typescript' : 'template'); + if (fs.existsSync(templatePath)) { fs.copySync(templatePath, appPath); } else { diff --git a/packages/react-scripts/template-wheeler/README.md b/packages/react-scripts/template-minimal/README.md similarity index 100% rename from packages/react-scripts/template-wheeler/README.md rename to packages/react-scripts/template-minimal/README.md diff --git a/packages/react-scripts/template-wheeler/gitignore b/packages/react-scripts/template-minimal/gitignore similarity index 100% rename from packages/react-scripts/template-wheeler/gitignore rename to packages/react-scripts/template-minimal/gitignore diff --git a/packages/react-scripts/template-wheeler/public/favicon.ico b/packages/react-scripts/template-minimal/public/favicon.ico similarity index 100% rename from packages/react-scripts/template-wheeler/public/favicon.ico rename to packages/react-scripts/template-minimal/public/favicon.ico diff --git a/packages/react-scripts/template-wheeler/public/index.html b/packages/react-scripts/template-minimal/public/index.html similarity index 100% rename from packages/react-scripts/template-wheeler/public/index.html rename to packages/react-scripts/template-minimal/public/index.html diff --git a/packages/react-scripts/template-wheeler/public/manifest.json b/packages/react-scripts/template-minimal/public/manifest.json similarity index 100% rename from packages/react-scripts/template-wheeler/public/manifest.json rename to packages/react-scripts/template-minimal/public/manifest.json diff --git a/packages/react-scripts/template-minimal/src/App.js b/packages/react-scripts/template-minimal/src/App.js new file mode 100644 index 00000000000..be5ae551b4a --- /dev/null +++ b/packages/react-scripts/template-minimal/src/App.js @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function App() { + return

React App

; +} diff --git a/packages/react-scripts/template-wheeler/src/index.css b/packages/react-scripts/template-minimal/src/index.css similarity index 100% rename from packages/react-scripts/template-wheeler/src/index.css rename to packages/react-scripts/template-minimal/src/index.css diff --git a/packages/react-scripts/template-wheeler/src/index.js b/packages/react-scripts/template-minimal/src/index.js similarity index 100% rename from packages/react-scripts/template-wheeler/src/index.js rename to packages/react-scripts/template-minimal/src/index.js diff --git a/packages/react-scripts/template-wheeler/src/App.js b/packages/react-scripts/template-wheeler/src/App.js deleted file mode 100644 index 0d3f4c1dfd8..00000000000 --- a/packages/react-scripts/template-wheeler/src/App.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; -import styled from '@emotion/styled' - -const Message = styled.h1` - font-weight: italic; -`; - -export default function App() { - return Let's Party; -} From 70950e6d7e8e0607b2d69b57d83d77d35b8fc142 Mon Sep 17 00:00:00 2001 From: Ken Wheeler Date: Thu, 24 Jan 2019 17:00:46 -0500 Subject: [PATCH 4/5] we can't have nice things --- packages/create-react-app/createReactApp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js index 86bf3376346..bf42973ce1a 100755 --- a/packages/create-react-app/createReactApp.js +++ b/packages/create-react-app/createReactApp.js @@ -375,7 +375,7 @@ function run( minimal ) { const packageToInstall = getInstallPackage(version, originalDirectory); - const allDependencies = !minimal ? ['react', 'react-dom', packageToInstall] : ['react@next', 'react-dom@next', packageToInstall]; + const allDependencies = ['react', 'react-dom', packageToInstall]; if (useTypescript) { // TODO: get user's node version instead of installing latest allDependencies.push( From 75f91f2b003ca0dbcfe1b46bd7b7307842cd8aa3 Mon Sep 17 00:00:00 2001 From: Ken Wheeler Date: Thu, 24 Jan 2019 17:12:57 -0500 Subject: [PATCH 5/5] reverting to dork mode --- packages/react-scripts/template-minimal/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/template-minimal/src/index.js b/packages/react-scripts/template-minimal/src/index.js index b737346c4dd..d132eca2b40 100644 --- a/packages/react-scripts/template-minimal/src/index.js +++ b/packages/react-scripts/template-minimal/src/index.js @@ -3,4 +3,4 @@ import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; -ReactDOM.createRoot(document.getElementById('root')).render(); +ReactDOM.unstable_createRoot(document.getElementById('root')).render();