Skip to content

Commit 0640a20

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pwa
# Conflicts: # packages/react-scripts/config/webpack.config.prod.js
2 parents 86d590d + 13f26e3 commit 0640a20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1444
-618
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.idea/
2+
.vscode/
13
node_modules/
24
build
35
.DS_Store

.travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ cache:
88
- node_modules
99
- packages/create-react-app/node_modules
1010
- packages/react-scripts/node_modules
11+
install: true
1112
script:
1213
- 'if [ $TEST_SUITE = "simple" ]; then tasks/e2e-simple.sh; fi'
1314
- 'if [ $TEST_SUITE = "installs" ]; then tasks/e2e-installs.sh; fi'
@@ -21,5 +22,7 @@ env:
2122
- TEST_SUITE=kitchensink
2223
matrix:
2324
include:
25+
- node_js: 0.10
26+
env: TEST_SUITE=simple
2427
- node_js: 6
2528
env: USE_YARN=yes TEST_SUITE=simple

CHANGELOG.md

+229-33
Large diffs are not rendered by default.

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Following these guidelines helps to communicate that you respect the time of the
1010

1111
As much as possible, we try to avoid adding configuration and flags. The purpose of this tool is to provide the best experience for people getting started with React, and this will always be our first priority. This means that sometimes we [sacrifice additional functionality](https://gettingreal.37signals.com/ch05_Half_Not_Half_Assed.php) (such as server rendering) because it is too hard to solve it in a way that wouldn’t require any configuration.
1212

13-
We prefer **convention, heuristics, or interactivity** over configuration.
13+
We prefer **convention, heuristics, or interactivity** over configuration.<br>
1414
Here’s a few examples of them in action.
1515

1616
### Convention

README.md

+12-6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Create React apps with no build configuration.
55
* [Getting Started](#getting-started) – How to create a new app.
66
* [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
77

8+
Create React App works on macOS, Windows, and Linux.<br>
9+
If something doesn’t work please [file an issue](https://github.com/facebookincubator/create-react-app/issues/new).
10+
811
## tl;dr
912

1013
```sh
@@ -13,7 +16,6 @@ npm install -g create-react-app
1316
create-react-app my-app
1417
cd my-app/
1518
npm start
16-
1719
```
1820

1921
Then open [http://localhost:3000/](http://localhost:3000/) to see your app.<br>
@@ -70,7 +72,7 @@ my-app/
7072
No configuration or complicated folder structures, just the files you need to build your app.<br>
7173
Once the installation is done, you can run some commands inside the project folder:
7274

73-
### `npm start`
75+
### `npm start` or `yarn start`
7476

7577
Runs the app in development mode.<br>
7678
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
@@ -80,14 +82,14 @@ You will see the build errors and lint warnings in the console.
8082

8183
<img src='https://camo.githubusercontent.com/41678b3254cf583d3186c365528553c7ada53c6e/687474703a2f2f692e696d6775722e636f6d2f466e4c566677362e706e67' width='600' alt='Build errors'>
8284

83-
### `npm test`
85+
### `npm test` or `yarn test`
8486

8587
Runs the test watcher in an interactive mode.<br>
8688
By default, runs tests related to files changes since the last commit.
8789

8890
[Read more about testing.](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests)
8991

90-
### `npm run build`
92+
### `npm run build` or `yarn build`
9193

9294
Builds the app for production to the `build` folder.<br>
9395
It correctly bundles React in production mode and optimizes the build for the best performance.
@@ -103,13 +105,16 @@ The [User Guide](https://github.com/facebookincubator/create-react-app/blob/mast
103105
- [Updating to New Releases](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#updating-to-new-releases)
104106
- [Folder Structure](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#folder-structure)
105107
- [Available Scripts](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#available-scripts)
108+
- [Supported Language Features and Polyfills](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#supported-language-features-and-polyfills)
106109
- [Syntax Highlighting in the Editor](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#syntax-highlighting-in-the-editor)
107110
- [Displaying Lint Output in the Editor](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#displaying-lint-output-in-the-editor)
111+
- [Debugging in the Editor](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#debugging-in-the-editor)
108112
- [Changing the Page `<title>`](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#changing-the-page-title)
109113
- [Installing a Dependency](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#installing-a-dependency)
110114
- [Importing a Component](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#importing-a-component)
111115
- [Adding a Stylesheet](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-stylesheet)
112116
- [Post-Processing CSS](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#post-processing-css)
117+
- [Adding a CSS Preprocessor (Sass, Less etc.)](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc)
113118
- [Adding Images and Fonts](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-images-and-fonts)
114119
- [Using the `public` Folder](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder)
115120
- [Using Global Variables](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-global-variables)
@@ -121,6 +126,7 @@ The [User Guide](https://github.com/facebookincubator/create-react-app/blob/mast
121126
- [Proxying API Requests in Development](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#proxying-api-requests-in-development)
122127
- [Using HTTPS in Development](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-https-in-development)
123128
- [Generating Dynamic `<meta>` Tags on the Server](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#generating-dynamic-meta-tags-on-the-server)
129+
- [Pre-Rendering into Static HTML Files](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#pre-rendering-into-static-html-files)
124130
- [Running Tests](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests)
125131
- [Developing Components in Isolation](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#developing-components-in-isolation)
126132
- [Making a Progressive Web App](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app)
@@ -175,7 +181,7 @@ Some features are currently **not supported**:
175181
* Server rendering.
176182
* Some experimental syntax extensions (e.g. decorators).
177183
* CSS Modules.
178-
* LESS or Sass.
184+
* Importing LESS or Sass directly ([but you still can use them](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc)).
179185
* Hot reloading of components.
180186

181187
Some of them might get added in the future if they are stable, are useful to majority of React apps, don’t conflict with existing tools, and don’t introduce additional configuration.
@@ -212,7 +218,7 @@ If you don’t agree with the choices made in this project, you might want to ex
212218
Some of the more popular and actively maintained ones are:
213219

214220
* [insin/nwb](https://github.com/insin/nwb)
215-
* [mozilla/neo](https://github.com/mozilla/neo)
221+
* [mozilla-neutrino/neutrino-dev](https://github.com/mozilla-neutrino/neutrino-dev)
216222
* [NYTimes/kyt](https://github.com/NYTimes/kyt)
217223
* [zeit/next.js](https://github.com/zeit/next.js)
218224
* [gatsbyjs/gatsby](https://github.com/gatsbyjs/gatsby)

appveyor.cleanup-cache.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Edit this file to trigger a cache rebuild.
2+
http://help.appveyor.com/discussions/questions/1310-delete-cache
3+
4+
----
5+
Just testing if this works.
6+
Hello, world.

appveyor.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
environment:
2+
matrix:
3+
- nodejs_version: 6
4+
test_suite: "simple"
5+
- nodejs_version: 6
6+
test_suite: "installs"
7+
- nodejs_version: 6
8+
test_suite: "kitchensink"
9+
- nodejs_version: 4
10+
test_suite: "simple"
11+
- nodejs_version: 4
12+
test_suite: "installs"
13+
- nodejs_version: 4
14+
test_suite: "kitchensink"
15+
16+
cache:
17+
- node_modules -> appveyor.cleanup-cache.txt
18+
- packages\react-scripts\node_modules -> appveyor.cleanup-cache.txt
19+
20+
clone_depth: 50
21+
22+
matrix:
23+
fast_finish: true
24+
25+
platform:
26+
- x64
27+
28+
install:
29+
- ps: Install-Product node $env:nodejs_version $env:platform
30+
31+
build: off
32+
33+
skip_commits:
34+
files:
35+
- '**/*.md'
36+
37+
test_script:
38+
- node --version
39+
- npm --version
40+
- sh tasks/e2e-%test_suite%.sh

lerna.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"lerna": "2.0.0-beta.37",
2+
"lerna": "2.0.0-beta.38",
33
"version": "independent",
44
"changelog": {
55
"repo": "facebookincubator/create-react-app",
@@ -12,5 +12,8 @@
1212
"tag: internal": ":house: Internal"
1313
},
1414
"cacheDir": ".changelog"
15-
}
15+
},
16+
"packages": [
17+
"packages/*"
18+
]
1619
}

package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
"test": "node packages/react-scripts/scripts/test.js --env=jsdom"
1212
},
1313
"devDependencies": {
14-
"babel-eslint": "6.1.2",
15-
"eslint": "3.5.0",
16-
"eslint-config-react-app": "0.2.1",
17-
"eslint-plugin-flowtype": "2.18.1",
18-
"eslint-plugin-import": "1.12.0",
19-
"eslint-plugin-jsx-a11y": "2.2.2",
20-
"eslint-plugin-react": "6.3.0",
21-
"lerna": "^2.0.0-beta.37",
14+
"babel-eslint": "7.1.0",
15+
"eslint": "3.16.1",
16+
"eslint-config-react-app": "0.5.1",
17+
"eslint-plugin-flowtype": "2.21.0",
18+
"eslint-plugin-import": "2.0.1",
19+
"eslint-plugin-jsx-a11y": "4.0.0",
20+
"eslint-plugin-react": "6.4.1",
21+
"lerna": "2.0.0-beta.38",
2222
"lerna-changelog": "^0.2.3"
2323
}
2424
}

packages/babel-preset-react-app/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# babel-preset-react-app
22

3-
This package includes the Babel preset used by [Create React App](https://github.com/facebookincubator/create-react-app).
3+
This package includes the Babel preset used by [Create React App](https://github.com/facebookincubator/create-react-app).<br>
44
Please refer to its documentation:
55

66
* [Getting Started](https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started) – How to create a new app.

packages/babel-preset-react-app/index.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ if (env === 'development' || env === 'test') {
6464
}
6565

6666
if (env === 'test') {
67-
plugins.push.apply(plugins, [
68-
// We always include this plugin regardless of environment
69-
// because of a Babel bug that breaks object rest/spread without it:
70-
// https://github.com/babel/babel/issues/4851
71-
require.resolve('babel-plugin-transform-es2015-parameters')
72-
]);
73-
7467
module.exports = {
7568
presets: [
7669
// ES features necessary for user's Node version
@@ -82,7 +75,10 @@ if (env === 'test') {
8275
// JSX, Flow
8376
require.resolve('babel-preset-react')
8477
],
85-
plugins: plugins
78+
plugins: plugins.concat([
79+
// Compiles import() to a deferred require()
80+
require.resolve('babel-plugin-dynamic-import-node')
81+
])
8682
};
8783
} else {
8884
module.exports = {
@@ -102,6 +98,8 @@ if (env === 'test') {
10298
// Async functions are converted to generators by babel-preset-latest
10399
async: false
104100
}],
101+
// Adds syntax support for import()
102+
require.resolve('babel-plugin-syntax-dynamic-import'),
105103
])
106104
};
107105

packages/babel-preset-react-app/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "babel-preset-react-app",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "Babel preset used by Create React App",
55
"repository": "facebookincubator/create-react-app",
66
"license": "BSD-3-Clause",
@@ -11,8 +11,9 @@
1111
"index.js"
1212
],
1313
"dependencies": {
14+
"babel-plugin-dynamic-import-node": "1.0.0",
15+
"babel-plugin-syntax-dynamic-import": "6.18.0",
1416
"babel-plugin-transform-class-properties": "6.22.0",
15-
"babel-plugin-transform-es2015-parameters": "6.22.0",
1617
"babel-plugin-transform-object-rest-spread": "6.22.0",
1718
"babel-plugin-transform-react-constant-elements": "6.22.0",
1819
"babel-plugin-transform-react-jsx": "6.22.0",

packages/create-react-app/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# create-react-app
22

3-
This package includes the global command for [Create React App](https://github.com/facebookincubator/create-react-app).
3+
This package includes the global command for [Create React App](https://github.com/facebookincubator/create-react-app).<br>
44
Please refer to its documentation:
55

66
* [Getting Started](https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started) – How to create a new app.

0 commit comments

Comments
 (0)