From 4f1d261290eae0eca81f2c304873ba437dd62f98 Mon Sep 17 00:00:00 2001 From: JustStephanie <56750434+JustStephanie@users.noreply.github.com> Date: Tue, 22 Oct 2019 04:00:43 -0500 Subject: [PATCH] PR (#1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Link to ASP.NET Core docs (#7840) * Update readme gif links (#7849) * Update adding-bootstrap.md (#7853) typo fix * Move unused eslint webpack import into @remove-on-eject block (#7856) * 📖 DOC: Improvement (#7819) * Upgrade terser & enable parallel minification in wsl (#7857) * Add a GitHub Action that runs the build script (#7861) --- .github/workflows/build.yml | 13 +++++++++++++ README.md | 6 +++--- docusaurus/docs/adding-bootstrap.md | 2 +- docusaurus/docs/getting-started.md | 4 ++-- docusaurus/docs/integrating-with-an-api-backend.md | 5 +++++ packages/react-scripts/config/webpack.config.js | 7 ++----- packages/react-scripts/package.json | 3 +-- 7 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000000..7b94526e804 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,13 @@ +name: Build + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install + run: yarn --no-progress --non-interactive --no-lockfile + - name: Build + run: yarn build diff --git a/README.md b/README.md index 630ed3bd543..311077962c6 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Then open [http://localhost:3000/](http://localhost:3000/) to see your app.
When you’re ready to deploy to production, create a minified bundle with `npm run build`.

-npm start +npm start

### Get Started Immediately @@ -45,7 +45,7 @@ To create a new app, you may choose one of the following methods: npx create-react-app my-app ``` -_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))_ +_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) is a package runner tool that comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))_ ### npm @@ -104,7 +104,7 @@ The page will automatically reload if you make changes to the code.
You will see the build errors and lint warnings in the console.

-Build errors +Build errors

### `npm test` or `yarn test` diff --git a/docusaurus/docs/adding-bootstrap.md b/docusaurus/docs/adding-bootstrap.md index 141849c503d..1bbffda0854 100644 --- a/docusaurus/docs/adding-bootstrap.md +++ b/docusaurus/docs/adding-bootstrap.md @@ -39,7 +39,7 @@ To enable `scss` in Create React App you will need to install `node-sass`. npm install --save node-sass ``` -Alternatively you may use `yarn`:: +Alternatively you may use `yarn`: ```sh yarn add node-sass diff --git a/docusaurus/docs/getting-started.md b/docusaurus/docs/getting-started.md index 0a59a1a0a35..c374a39f564 100644 --- a/docusaurus/docs/getting-started.md +++ b/docusaurus/docs/getting-started.md @@ -23,7 +23,7 @@ Then open [http://localhost:3000/](http://localhost:3000/) to see your app. When you’re ready to deploy to production, create a minified bundle with `npm run build`.

-npm start +npm start

### Get Started Immediately @@ -118,7 +118,7 @@ Runs the app in development mode. Open [http://localhost:3000](http://localhost: The page will automatically reload if you make changes to the code. You will see the build errors and lint warnings in the console.

-Build errors +Build errors

### `npm test` or `yarn test` diff --git a/docusaurus/docs/integrating-with-an-api-backend.md b/docusaurus/docs/integrating-with-an-api-backend.md index bae06982988..60b9b1f43cd 100644 --- a/docusaurus/docs/integrating-with-an-api-backend.md +++ b/docusaurus/docs/integrating-with-an-api-backend.md @@ -23,3 +23,8 @@ You can find the companion GitHub repository [here](https://github.com/fullstack It allows creating hypermedia and GraphQL APIs in minutes. It is shipped with an official Progressive Web App generator as well as a dynamic administration interface, both built for Create React App. Check out [this tutorial](https://api-platform.com/docs/distribution). + + +## C# (ASP.NET Core) + +ASP.NET Core has a React project template that uses Create React App. Check out [their documentation](https://docs.microsoft.com/en-us/aspnet/core/client-side/spa/react). diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 6de37be2c18..074bb0d6d5f 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -9,7 +9,6 @@ 'use strict'; const fs = require('fs'); -const isWsl = require('is-wsl'); const path = require('path'); const webpack = require('webpack'); const resolve = require('resolve'); @@ -33,8 +32,8 @@ const getClientEnvironment = require('./env'); const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin'); const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin'); const typescriptFormatter = require('react-dev-utils/typescriptFormatter'); -const eslint = require('eslint'); // @remove-on-eject-begin +const eslint = require('eslint'); const getCacheIdentifier = require('react-dev-utils/getCacheIdentifier'); // @remove-on-eject-end const postcssNormalize = require('postcss-normalize'); @@ -255,9 +254,7 @@ module.exports = function(webpackEnv) { }, // Use multi-process parallel running to improve the build speed // Default number of concurrent runs: os.cpus().length - 1 - // Disabled on WSL (Windows Subsystem for Linux) due to an issue with Terser - // https://github.com/webpack-contrib/terser-webpack-plugin/issues/21 - parallel: !isWsl, + parallel: true, // Enable file caching cache: true, sourceMap: shouldUseSourceMap, diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index a21817920a7..9d92e63c390 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -54,7 +54,6 @@ "fs-extra": "7.0.1", "html-webpack-plugin": "4.0.0-beta.5", "identity-obj-proxy": "3.0.0", - "is-wsl": "^1.1.0", "jest": "24.9.0", "jest-environment-jsdom-fourteen": "0.1.0", "jest-resolve": "24.9.0", @@ -74,7 +73,7 @@ "sass-loader": "7.2.0", "semver": "6.3.0", "style-loader": "1.0.0", - "terser-webpack-plugin": "1.4.1", + "terser-webpack-plugin": "2.1.3", "ts-pnp": "1.1.4", "url-loader": "2.1.0", "webpack": "4.41.0",