Improved language used in markdown code blocks. (#6419)

* Improved language used in code blocks.
This commit is contained in:
Ioannis Cherouvim
2019-02-22 07:16:33 +02:00
committed by Amy Lam
parent b8386fe04f
commit 7ec36479b3
16 changed files with 129 additions and 129 deletions

View File

@@ -44,7 +44,7 @@
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.9.5
```
@@ -130,13 +130,13 @@ npm install --save-dev --save-exact react-scripts@0.9.5
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.9.4
```
You may also optionally update the global command-line utility for scoped package support:
```
```sh
npm install -g create-react-app@1.3.0
```
@@ -187,13 +187,13 @@ npm install -g create-react-app@1.3.0
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.9.3
```
You may also optionally update the global command-line utility for offline Yarn cache support:
```
```sh
npm install -g create-react-app@1.2.1
```
@@ -322,13 +322,13 @@ npm install -g create-react-app@1.2.1
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.9.2
```
You may also optionally update the global command-line utility for more efficient installs (thanks [@n3tr](https://github.com/n3tr)):
```
```sh
npm install -g create-react-app@1.1.0
```
@@ -494,7 +494,7 @@ Thanks to [@Timer](https://github.com/timer) for cutting this release.
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.9.0
```
@@ -519,13 +519,13 @@ Thanks to [@fson](https://github.com/fson) for cutting this release.
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.8.5
```
You may also optionally update the global command-line utility:
```
```sh
npm install -g create-react-app@1.0.3
```
@@ -621,13 +621,13 @@ npm install -g create-react-app@1.0.3
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.8.4
```
You may also optionally update the global command-line utility:
```
```sh
npm install -g create-react-app@1.0.2
```
@@ -662,13 +662,13 @@ npm install -g create-react-app@1.0.2
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.8.3
```
You can optionally update the global CLI too:
```
```sh
npm install -g create-react-app@1.0.1
```
@@ -751,7 +751,7 @@ npm install -g create-react-app@1.0.1
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.8.2
```
@@ -767,7 +767,7 @@ Thanks to [@fson](https://github.com/fson) for cutting this release.
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.8.1
```
@@ -917,13 +917,13 @@ Thanks to [@fson](https://github.com/fson) for cutting this release.
You may optionally update the global command (its not required, but it adds Yarn support for new projects):
```
```sh
npm install -g create-react-app@1.0.0
```
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.8.0
```
@@ -969,13 +969,13 @@ Thanks to [@fson](https://github.com/fson) for cutting this release.
You may optionally update the global command (its not required):
```
```sh
npm install -g create-react-app@0.6.0
```
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.7.0
```
@@ -984,7 +984,7 @@ npm install --save-dev --save-exact react-scripts@0.7.0
#### Updating Snapshots
Jest 16 includes [improvements to snapshot testing and changes to the snapshot format](https://facebook.github.io/jest/blog/2016/10/03/jest-16.html#snapshot-updates). If your project uses snapshot testing, you'll need to update the snapshot files. To update the snapshots, run:
```
```sh
npm test -- -u
```
@@ -1002,7 +1002,7 @@ npm test -- -u
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.6.1
```
@@ -1020,7 +1020,7 @@ npm install --save-dev --save-exact react-scripts@0.6.1
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.6.0
```
@@ -1040,7 +1040,7 @@ npm install --save-dev --save-exact react-scripts@0.6.0
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.5.1
```
@@ -1077,7 +1077,7 @@ npm install --save-dev --save-exact react-scripts@0.5.1
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.5.0
```
@@ -1095,7 +1095,7 @@ You can no longer reference any files from `./src` in `index.html`. Instead, `pu
For example, instead of:
```js
```html
<link rel="shortcut icon" href="./src/favicon.ico">
```
@@ -1120,7 +1120,7 @@ It contained no changes to the code.
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.4.3
```
@@ -1153,13 +1153,13 @@ npm install --save-dev --save-exact react-scripts@0.4.3
You may optionally update the global command (its not required):
```
```sh
npm install -g create-react-app@0.4.2
```
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.4.2
```
@@ -1174,7 +1174,7 @@ npm install --save-dev --save-exact react-scripts@0.4.2
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.4.1
```
@@ -1191,7 +1191,7 @@ npm install --save-dev --save-exact react-scripts@0.4.1
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.4.0
```
@@ -1215,7 +1215,7 @@ If you referenced some other files from `index.html`, please file an issue to di
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.3.1
```
@@ -1239,13 +1239,13 @@ npm install --save-dev --save-exact react-scripts@0.3.1
You may optionally update the global command (its not required):
```
```sh
npm install -g create-react-app@0.3.0
```
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.3.0
```
@@ -1357,13 +1357,13 @@ Newly created projects will use `0.2.1` automatically. You **dont** need to u
You may optionally update the global command (its not required):
```
```sh
npm install -g create-react-app@0.2.0
```
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@0.2.0
```

View File

@@ -21,13 +21,13 @@
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.1.5
```
or
```
```sh
yarn add --exact react-scripts@1.1.5
```
@@ -47,13 +47,13 @@ yarn add --exact react-scripts@1.1.5
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.1.4
```
or
```
```sh
yarn add --exact react-scripts@1.1.4
```
@@ -73,13 +73,13 @@ yarn add --exact react-scripts@1.1.4
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.1.3
```
or
```
```sh
yarn add --exact react-scripts@1.1.3
```
@@ -106,13 +106,13 @@ yarn add --exact react-scripts@1.1.3
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.1.2
```
or
```
```sh
yarn add --exact react-scripts@1.1.2
```
@@ -151,13 +151,13 @@ yarn add --exact react-scripts@1.1.2
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.1.1
```
or
```
```sh
yarn add --exact react-scripts@1.1.1
```
@@ -337,13 +337,13 @@ yarn add --exact react-scripts@1.1.1
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.1.0
```
or
```
```sh
yarn add --exact react-scripts@1.1.0
```
@@ -372,13 +372,13 @@ yarn add --exact react-scripts@1.1.0
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.0.17
```
or
```
```sh
yarn add --exact react-scripts@1.0.17
```
@@ -403,13 +403,13 @@ yarn add --exact react-scripts@1.0.17
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.0.16
```
or
```
```sh
yarn add --exact react-scripts@1.0.16
```
@@ -519,13 +519,13 @@ yarn add --exact react-scripts@1.0.16
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.0.15
```
or
```
```sh
yarn add --exact react-scripts@1.0.15
```
@@ -604,13 +604,13 @@ yarn add --exact react-scripts@1.0.15
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.0.14
```
or
```
```sh
yarn add --exact react-scripts@1.0.14
```
@@ -653,13 +653,13 @@ yarn add --exact react-scripts@1.0.14
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.0.13
```
or
```
```sh
yarn add --exact react-scripts@1.0.13
```
@@ -718,13 +718,13 @@ yarn add --exact react-scripts@1.0.13
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.0.12
```
or
```
```sh
yarn add --exact react-scripts@1.0.12
```
@@ -841,13 +841,13 @@ yarn add --exact react-scripts@1.0.12
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.0.11
```
or
```
```sh
yarn add --exact react-scripts@1.0.11
```
@@ -880,13 +880,13 @@ yarn add --exact react-scripts@1.0.11
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.0.10
```
or
```
```sh
yarn add --exact react-scripts@1.0.10
```
@@ -925,13 +925,13 @@ yarn add --exact react-scripts@1.0.10
Inside any created project that has not been ejected, run:
```
```sh
npm install --save --save-exact react-scripts@1.0.9
```
or
```
```sh
yarn add --exact react-scripts@1.0.9
```
@@ -1094,13 +1094,13 @@ yarn add --exact react-scripts@1.0.9
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@1.0.8
```
or
```
```sh
yarn add --dev --exact react-scripts@1.0.8
```
@@ -1153,13 +1153,13 @@ If you haven't changed the default CSS organization, you may want to apply [this
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@1.0.7
```
or
```
```sh
yarn add --dev --exact react-scripts@1.0.7
```
@@ -1198,13 +1198,13 @@ yarn add --dev --exact react-scripts@1.0.7
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@1.0.6
```
or
```
```sh
yarn add --dev --exact react-scripts@1.0.6
```
@@ -1241,13 +1241,13 @@ yarn add --dev --exact react-scripts@1.0.6
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@1.0.5
```
or
```
```sh
yarn add --dev --exact react-scripts@1.0.5
```
@@ -1262,13 +1262,13 @@ yarn add --dev --exact react-scripts@1.0.5
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@1.0.4
```
or
```
```sh
yarn add --dev --exact react-scripts@1.0.4
```
@@ -1302,13 +1302,13 @@ yarn add --dev --exact react-scripts@1.0.4
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@1.0.3
```
or
```
```sh
yarn add --dev --exact react-scripts@1.0.3
```
@@ -1355,13 +1355,13 @@ yarn add --dev --exact react-scripts@1.0.3
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@1.0.2
```
or
```
```sh
yarn add --dev --exact react-scripts@1.0.2
```
@@ -1431,13 +1431,13 @@ If you previously had issues with an `Invalid Host Header` error, [follow these
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@1.0.1
```
or
```
```sh
yarn add --dev --exact react-scripts@1.0.1
```
@@ -1456,13 +1456,13 @@ First, ensure you are using the latest [Node 6 LTS or newer](https://nodejs.org/
Inside any created project that has not been ejected, run:
```
```sh
npm install --save-dev --save-exact react-scripts@1.0.0
```
You may also optionally update the global command-line utility for bug fixes:
```
```sh
npm install -g create-react-app
```
@@ -1473,7 +1473,7 @@ We also never explicitly forbid doing so, which caused confusion when things did
When running or building your application, you may see a message like so:
```
```sh
You attempted to import ... which falls outside of the project src/ directory.
```

View File

@@ -6,13 +6,13 @@ v2.1.5 is a maintenance release that reverts the TypeScript speed improvements (
Inside any created project that has not been ejected, run:
```bash
```sh
npm install --save --save-exact react-scripts@2.1.5
```
or
```
```sh
yarn add --exact react-scripts@2.1.5
```
@@ -120,13 +120,13 @@ v2.1.4 is a maintenance release that brings a number of awesome improvements. A
Inside any created project that has not been ejected, run:
```bash
```sh
npm install --save --save-exact react-scripts@2.1.4
```
or
```
```sh
yarn add --exact react-scripts@2.1.4
```
@@ -170,13 +170,13 @@ v2.1.3 is a maintenance release to fix a [vulnerability in webpack-dev-server](h
Inside any created project that has not been ejected, run:
```bash
```sh
npm install --save --save-exact react-scripts@2.1.3
```
or
```
```sh
yarn add --exact react-scripts@2.1.3
```
@@ -309,13 +309,13 @@ v2.1.2 is a maintenance release including various bug fixes.
Inside any created project that has not been ejected, run:
```bash
```sh
npm install --save --save-exact react-scripts@2.1.2
```
or
```
```sh
yarn add --exact react-scripts@2.1.2
```
@@ -365,13 +365,13 @@ Happy Halloween 🎃 👻! This spooky release brings a treat: decorator support
Inside any created project that has not been ejected, run:
```bash
```sh
npm install --save --save-exact react-scripts@2.1.1
```
or
```
```sh
yarn add --exact react-scripts@2.1.1
```
@@ -381,7 +381,7 @@ Create React App 2.1 adds support for TypeScript! Read [the documentation](https
New applications can be created using TypeScript by running:
```bash
```sh
$ npx create-react-app my-app --typescript
```
@@ -468,13 +468,13 @@ $ npx create-react-app my-app --typescript
Inside any created project that has not been ejected, run:
```bash
```sh
npm install --save --save-exact react-scripts@2.1.0
```
or
```
```sh
yarn add --exact react-scripts@2.1.0
```
@@ -567,13 +567,13 @@ yarn add --exact react-scripts@2.1.0
Inside any created project that has not been ejected, run:
```bash
```sh
npm install --save --save-exact react-scripts@2.0.5
```
or
```
```sh
yarn add --exact react-scripts@2.0.5
```
@@ -633,13 +633,13 @@ yarn add --exact react-scripts@2.0.5
Inside any created project that has not been ejected, run:
```bash
```sh
npm install --save --save-exact react-scripts@2.0.4
```
or
```
```sh
yarn add --exact react-scripts@2.0.4
```
@@ -656,13 +656,13 @@ It provides a high-level overview of new features and improvements. Now let's se
Inside any created project that has not been ejected, run:
```bash
```sh
npm install --save --save-exact react-scripts@2.0.3
```
or
```
```sh
yarn add --exact react-scripts@2.0.3
```
@@ -682,13 +682,13 @@ We have dropped default support for Internet Explorer 9, 10, and 11. If you stil
First, install `react-app-polyfill`:
```bash
```sh
npm install react-app-polyfill
```
or
```
```sh
yarn add react-app-polyfill
```
@@ -774,13 +774,13 @@ If your `proxy` is an object, that means you are using the advanced proxy config
First, install `http-proxy-middleware` using npm or Yarn:
```bash
```sh
npm install http-proxy-middleware
```
or
```
```sh
yarn add http-proxy-middleware
```

View File

@@ -94,7 +94,7 @@ Once it is done, you can modify any file locally and run `yarn start`, `yarn tes
If you want to try out the end-to-end flow with the global CLI, you can do this too:
```
```sh
yarn create-react-app my-app
cd my-app
```

View File

@@ -12,7 +12,7 @@ Following this rule often makes CSS preprocessors less useful, as features like
To use Sass, first install `node-sass`:
```bash
```sh
$ npm install node-sass --save
$ # or
$ yarn add node-sass

View File

@@ -95,7 +95,7 @@ set "REACT_APP_NOT_SECRET_CODE=abcdef" && npm start
### Linux, macOS (Bash)
```bash
```sh
REACT_APP_NOT_SECRET_CODE=abcdef npm start
```

View File

@@ -9,7 +9,7 @@ title: Adding TypeScript
To start a new Create React App project with [TypeScript](https://www.typescriptlang.org/), you can run:
```bash
```sh
npx create-react-app my-app --typescript
# or
@@ -19,7 +19,7 @@ yarn create react-app my-app --typescript
To add [TypeScript](https://www.typescriptlang.org/) to a Create React App project, first install it:
```bash
```sh
npm install --save typescript @types/node @types/react @types/react-dom @types/jest
# or

View File

@@ -33,7 +33,7 @@ Then in `package.json`, add the following line to `scripts`:
Then to analyze the bundle run the production build then run the analyze
script.
```
```sh
npm run build
npm run analyze
```

View File

@@ -20,7 +20,7 @@ Add the following to the `scripts` section in your project's `package.json`
Place `debugger;` statements in any test and run:
```bash
```sh
$ npm run test:debug
```
@@ -42,7 +42,7 @@ Debugging Jest tests is supported out of the box for [Visual Studio Code](https:
Use the following [`launch.json`](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations) configuration file:
```
```json
{
"version": "0.2.0",
"configurations": [

View File

@@ -209,7 +209,7 @@ Then run the `firebase init` command from your projects root. You need to cho
IMPORTANT: you need to set proper HTTP caching headers for `service-worker.js` file in `firebase.json` file or you will not be able to see changes after first deployment ([issue #2440](https://github.com/facebook/create-react-app/issues/2440)). It should be added inside `"hosting"` key like next:
```
```json
{
"hosting": {
...

View File

@@ -17,7 +17,7 @@ Such setup is **not** required. However, if you **do** have a setup like this, i
To tell the development server to proxy any unknown requests to your API server in development, add a `proxy` field to your `package.json`, for example:
```js
```json
"proxy": "http://localhost:4000",
```
@@ -74,7 +74,7 @@ You can use this feature in conjunction with the `proxy` property in `package.js
First, install `http-proxy-middleware` using npm or Yarn:
```bash
```sh
$ npm install http-proxy-middleware --save
$ # or
$ yarn add http-proxy-middleware

View File

@@ -321,7 +321,7 @@ Popular CI servers already set the environment variable `CI` by default but you
1. Following the [Travis Getting started](https://docs.travis-ci.com/user/getting-started/) guide for syncing your GitHub repository with Travis. You may need to initialize some settings manually in your [profile](https://travis-ci.org/profile) page.
1. Add a `.travis.yml` file to your git repository.
```
```yaml
language: node_js
node_js:
- 8
@@ -366,11 +366,11 @@ set CI=true&&npm run build
#### Linux, macOS (Bash)
```bash
```sh
CI=true npm test
```
```bash
```sh
CI=true npm run build
```

View File

@@ -26,7 +26,7 @@ set HTTPS=true&&npm start
### Linux, macOS (Bash)
```bash
```sh
HTTPS=true npm start
```

View File

@@ -24,7 +24,7 @@ npm install babel-preset-react-app --save-dev
Then create a file named `.babelrc` with following contents in the root folder of your project:
```js
```json
{
"presets": ["react-app"]
}
@@ -36,7 +36,7 @@ This preset uses the `useBuiltIns` option with [transform-object-rest-spread](ht
Flow is enabled by default. Make sure you have a `.flowconfig` file at the root directory. You can also use the `flow` option on `.babelrc`:
```
```json
{
"presets": [["react-app", { "flow": true, "typescript": false }]]
}
@@ -46,7 +46,7 @@ Flow is enabled by default. Make sure you have a `.flowconfig` file at the root
TypeScript is enabled by default. Make sure you have a `tsconfig.json` file at the root directory. You can also use the `typescript` option on `.babelrc`:
```
```json
{
"presets": [["react-app", { "flow": false, "typescript": true }]]
}

View File

@@ -20,7 +20,7 @@ This package exports a list of globals that are often used by mistake. You can f
## Installation
```
```sh
npm install --save confusing-browser-globals
```

View File

@@ -19,13 +19,13 @@ Each polyfill ensures the following language features are present:
First, install the package using Yarn or npm:
```bash
```sh
npm install react-app-polyfill
```
or
```bash
```sh
yarn add react-app-polyfill
```