Skip to content

Commit b6e442f

Browse files
ghttimdorr
authored andcommitted
docs: Add language identifier to all code blocks (reduxjs#3228)
1 parent f100adc commit b6e442f

10 files changed

+29
-29
lines changed

CONTRIBUTING.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Visit the [issue tracker](https://github.com/reduxjs/redux/issues) to find a lis
3434

3535
Fork, then clone the repo:
3636

37-
```
37+
```sh
3838
git clone https://github.com/your-username/redux.git
3939
```
4040

@@ -44,27 +44,27 @@ git clone https://github.com/your-username/redux.git
4444

4545
Running the `build` task will create a CommonJS module-per-module build, a ES Modules build and a UMD build.
4646

47-
```
47+
```sh
4848
npm run build
4949
```
5050

5151
### Testing and Linting
5252

5353
To only run linting:
5454

55-
```
55+
```sh
5656
npm run lint
5757
```
5858

5959
To only run tests:
6060

61-
```
61+
```sh
6262
npm run test
6363
```
6464

6565
To continuously watch and run tests, run the following:
6666

67-
```
67+
```sh
6868
npm run test:watch
6969
```
7070

@@ -84,7 +84,7 @@ When adding a new example, please adhere to the style and format of the existing
8484

8585
To test the official Redux examples, run the following:
8686

87-
```
87+
```sh
8888
npm run examples:test
8989
```
9090

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Even if you haven't used Flux or Elm, Redux only takes a few minutes to get star
9090

9191
To install the stable version:
9292

93-
```
93+
```sh
9494
npm install --save redux
9595
```
9696

@@ -108,7 +108,7 @@ The Redux source code is written in ES2015 but we precompile both CommonJS and U
108108

109109
Most likely, you'll also need [the React bindings](https://github.com/reduxjs/react-redux) and [the developer tools](https://github.com/reduxjs/redux-devtools).
110110

111-
```
111+
```sh
112112
npm install --save react-redux
113113
npm install --save-dev redux-devtools
114114
```

docs/api/combineReducers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The resulting reducer calls every child reducer, and gathers their results into
99

1010
Example:
1111

12-
```
12+
```js
1313
rootReducer = combineReducers({potato: potatoReducer, tomato: tomatoReducer})
1414
// This would produce the following state object
1515
{

docs/basics/Actions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const boundCompleteTodo = index => dispatch(completeTodo(index))
9595

9696
Now you'll be able to call them directly:
9797

98-
```
98+
```js
9999
boundAddTodo(text)
100100
boundCompleteTodo(index)
101101
```

docs/basics/UsageWithReact.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ We will use React to build our simple todo app, and cover the basics of how to u
1212

1313
[React bindings](https://github.com/reduxjs/react-redux) are not included in Redux by default. You need to install them explicitly:
1414

15-
```
15+
```sh
1616
npm install --save react-redux
1717
```
1818

docs/introduction/Examples.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Redux is distributed with a few examples in its [source code](https://github.com
66

77
Run the [Counter Vanilla](https://github.com/reactjs/redux/tree/master/examples/counter-vanilla) example:
88

9-
```
9+
```sh
1010
git clone https://github.com/reactjs/redux.git
1111

1212
cd redux/examples/counter-vanilla
@@ -19,7 +19,7 @@ It does not require a build system or a view framework and exists to show the ra
1919

2020
Run the [Counter](https://github.com/reactjs/redux/tree/master/examples/counter) example:
2121

22-
```
22+
```sh
2323
git clone https://github.com/reactjs/redux.git
2424

2525
cd redux/examples/counter
@@ -39,7 +39,7 @@ This example includes tests.
3939

4040
Run the [Todos](https://github.com/reactjs/redux/tree/master/examples/todos) example:
4141

42-
```
42+
```sh
4343
git clone https://github.com/reactjs/redux.git
4444

4545
cd redux/examples/todos
@@ -57,7 +57,7 @@ This example includes tests.
5757

5858
Run the [Todos with Undo](https://github.com/reactjs/redux/tree/master/examples/todos-with-undo) example:
5959

60-
```
60+
```sh
6161
git clone https://github.com/reactjs/redux.git
6262

6363
cd redux/examples/todos-with-undo
@@ -73,7 +73,7 @@ This is a variation on the previous example. It is almost identical, but additio
7373

7474
Run the [TodoMVC](https://github.com/reactjs/redux/tree/master/examples/todomvc) example:
7575

76-
```
76+
```sh
7777
git clone https://github.com/reactjs/redux.git
7878

7979
cd redux/examples/todomvc
@@ -91,7 +91,7 @@ This example includes tests.
9191

9292
Run the [Shopping Cart](https://github.com/reactjs/redux/tree/master/examples/shopping-cart) example:
9393

94-
```
94+
```sh
9595
git clone https://github.com/reactjs/redux.git
9696

9797
cd redux/examples/shopping-cart
@@ -107,7 +107,7 @@ This example shows important idiomatic Redux patterns that become important as y
107107

108108
Run the [Tree View](https://github.com/reactjs/redux/tree/master/examples/tree-view) example:
109109

110-
```
110+
```sh
111111
git clone https://github.com/reactjs/redux.git
112112

113113
cd redux/examples/tree-view
@@ -125,7 +125,7 @@ This example includes tests.
125125

126126
Run the [Async](https://github.com/reactjs/redux/tree/master/examples/async) example:
127127

128-
```
128+
```sh
129129
git clone https://github.com/reactjs/redux.git
130130

131131
cd redux/examples/async
@@ -141,7 +141,7 @@ This example includes reading from an asynchronous API, fetching data in respons
141141

142142
Run the [Universal](https://github.com/reactjs/redux/tree/master/examples/universal) example:
143143

144-
```
144+
```sh
145145
git clone https://github.com/reactjs/redux.git
146146

147147
cd redux/examples/universal
@@ -155,7 +155,7 @@ This is a basic demonstration of [server rendering](../recipes/ServerRendering.m
155155

156156
Run the [Real World](https://github.com/reactjs/redux/tree/master/examples/real-world) example:
157157

158-
```
158+
```sh
159159
git clone https://github.com/reactjs/redux.git
160160

161161
cd redux/examples/real-world

docs/recipes/ConfiguringYourStore.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ We will add two middlewares and one enhancer:
4242

4343
#### Install `redux-thunk`
4444

45-
```
45+
```sh
4646
npm install --save redux-thunk
4747
```
4848

@@ -207,7 +207,7 @@ There are several ways to integrate the extension, but we will use the most conv
207207

208208
First, we install the package via npm:
209209

210-
```
210+
```sh
211211
npm install --save-dev redux-devtools-extension
212212
```
213213

docs/recipes/ImplementingUndoHistory.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ In this part of the recipe, you will learn how to make the [Todo List example](h
375375

376376
First of all, you need to run
377377

378-
```
378+
```sh
379379
npm install --save redux-undo
380380
```
381381

docs/recipes/ServerRendering.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ In the following recipe, we are going to look at how to set up server-side rende
2626

2727
For this example, we'll be using [Express](http://expressjs.com/) as a simple web server. We also need to install the React bindings for Redux, since they are not included in Redux by default.
2828

29-
```
29+
```sh
3030
npm install --save express react-redux
3131
```
3232

docs/recipes/WritingTests.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Because most of the Redux code you write are functions, and many of them are pur
77
We recommend [Jest](http://facebook.github.io/jest/) as the testing engine.
88
Note that it runs in a Node environment, so you won't have access to the DOM.
99

10-
```
10+
```sh
1111
npm install --save-dev jest
1212
```
1313

1414
To use it together with [Babel](http://babeljs.io), you will need to install `babel-jest`:
1515

16-
```
16+
```sh
1717
npm install --save-dev babel-jest
1818
```
1919

@@ -254,13 +254,13 @@ A nice thing about React components is that they are usually small and only rely
254254

255255
First, we will install [Enzyme](http://airbnb.io/enzyme/). Enzyme uses the [React Test Utilities](https://facebook.github.io/react/docs/test-utils.html) underneath, but is more convenient, readable, and powerful.
256256

257-
```
257+
```sh
258258
npm install --save-dev enzyme
259259
```
260260

261261
We will also need to install Enzyme adapter for our version of React. Enzyme has adapters that provide compatibility with `React 16.x`, `React 15.x`, `React 0.14.x` and `React 0.13.x`. If you are using React 16 you can run:
262262

263-
```
263+
```sh
264264
npm install --save-dev enzyme-adapter-react-16
265265
```
266266

0 commit comments

Comments
 (0)