diff --git a/packages/react-dev-utils/ignoredFiles.js b/packages/react-dev-utils/ignoredFiles.js index 50348ea6bdd..73a6e8bc5cf 100644 --- a/packages/react-dev-utils/ignoredFiles.js +++ b/packages/react-dev-utils/ignoredFiles.js @@ -8,12 +8,13 @@ 'use strict'; const path = require('path'); +const escape = require('escape-string-regexp'); module.exports = function ignoredFiles(appSrc) { return new RegExp( - `^(?!${path - .normalize(appSrc + '/') - .replace(/[\\]+/g, '/')}).+/node_modules/`, + `^(?!${escape( + path.normalize(appSrc + '/').replace(/[\\]+/g, '/') + )}).+/node_modules/`, 'g' ); }; diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index cbb57d8cdc2..95cf966a643 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -890,10 +890,10 @@ life of the shell session. #### Windows (cmd.exe) ```cmd -set REACT_APP_SECRET_CODE=abcdef&&npm start +set "REACT_APP_SECRET_CODE=abcdef" && npm start ``` -(Note: the lack of whitespace is intentional.) +(Note: Quotes around the variable assignment are required to avoid a trailing whitespace.) #### Linux, macOS (Bash) @@ -1258,7 +1258,7 @@ it('renders without crashing', () => { }); ``` -This test mounts a component and makes sure that it didn’t throw during rendering. Tests like this provide a lot value with very little effort so they are great as a starting point, and this is the test you will find in `src/App.test.js`. +This test mounts a component and makes sure that it didn’t throw during rendering. Tests like this provide a lot of value with very little effort so they are great as a starting point, and this is the test you will find in `src/App.test.js`. When you encounter bugs caused by changing components, you will gain a deeper insight into which parts of them are worth testing in your application. This might be a good time to introduce more specific tests asserting specific expected output or behavior. @@ -2131,7 +2131,7 @@ In this case, ensure that the file is there with the proper lettercase and that **To do a manual deploy to Netlify’s CDN:** ```sh -npm install netlify-cli +npm install netlify-cli -g netlify deploy ```