Skip to content

Commit bd6d33c

Browse files
committed
Merge tag 'v1.0.7' into zeal
This merge is much more complicated than it should have been. Apparently, the parent project spun off a 0.9.x branch around 0.9.2 or so and never merged it back into master. Thus, there are a signficant number of changes here that resulted from conflicts between their branches. In this commit, I modified our `lint` script to match the changes made upstream in the other scripts. This commit merges some of our customizations in, but not all yet. I'll add those back in later commits. In particular: * I haven't added Sass and CSS modules support back into the Webpack configuration files. * I haven't added back the changes needed to resolve imports from the `client` directory. * I haven't added back the changes needed to configure the public path in dev mode; the `start` script was refactored heavily, so we need to figure out how to do what we need to do. * I haven't added back the changes needed to keep the browser from automatically opening.
1 parent 4e4d90a commit bd6d33c

File tree

175 files changed

+95296
-3528
lines changed

Some content is hidden

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

175 files changed

+95296
-3528
lines changed

.eslintrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"rules": {
1313
"no-console": "off",
14-
"strict": ["error", "global"]
14+
"strict": ["error", "global"],
15+
"curly": "warn"
1516
}
1617
}

.travis.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
language: node_js
33
node_js:
4-
- 4
54
- 6
65
- 7
76
cache:
@@ -25,5 +24,7 @@ matrix:
2524
include:
2625
- node_js: 0.10
2726
env: TEST_SUITE=simple
28-
- node_js: 6
29-
env: USE_YARN=yes TEST_SUITE=simple
27+
# There's a weird Yarn/Lerna bug related to prerelease versions.
28+
# TODO: reenable after we ship 1.0.
29+
# - node_js: 6
30+
# env: USE_YARN=yes TEST_SUITE=simple

CHANGELOG-0.x.md

+1,374
Large diffs are not rendered by default.

CHANGELOG.md

+464-1,062
Large diffs are not rendered by default.

CONTRIBUTING.md

+32
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,36 @@ Please **ask first** if somebody else is already working on this or the core dev
4141

4242
Please also provide a **test plan**, i.e. specify how you verified that your addition works.
4343

44+
## Folder Structure of Create React App
45+
`create-react-app` is a monorepo, meaning it is divided into independent sub-packages.<br>
46+
These packages can be found in the [`packages/`](https://github.com/facebookincubator/create-react-app/tree/master/packages) directory.
47+
48+
### Overview of directory structure
49+
```
50+
packages/
51+
babel-preset-react-app/
52+
create-react-app/
53+
eslint-config-react-app/
54+
react-dev-utils/
55+
react-scripts/
56+
```
57+
### Package Descriptions
58+
#### [babel-preset-react-app](https://github.com/facebookincubator/create-react-app/tree/master/packages/babel-preset-react-app)
59+
This package is a babel preset intended to be used with `react-scripts`.<br>
60+
It targets platforms that React is designed to support (IE 9+) and enables experimental features used heavily at Facebook.<br>
61+
This package is enabled by default for all `create-react-app` scaffolded applications.
62+
#### [create-react-app](https://github.com/facebookincubator/create-react-app/tree/master/packages/create-react-app)
63+
The global CLI command code can be found in this directory, and shouldn't often be changed. It should run on Node 0.10+.
64+
#### [eslint-config-react-app](https://github.com/facebookincubator/create-react-app/tree/master/packages/eslint-config-react-app)
65+
This package contains a conservative set of rules focused on making errors apparent and enforces no style rules.<br>
66+
This package is enabled by default for all `create-react-app` scaffolded applications.
67+
#### [react-dev-utils](https://github.com/facebookincubator/create-react-app/tree/master/packages/react-dev-utils)
68+
This package contains utilities used for `react-scripts` and sister packages.<br>
69+
Its main purpose is to conceal code which the user shouldn't be burdened with upon ejecting.
70+
#### [react-scripts](https://github.com/facebookincubator/create-react-app/tree/master/packages/react-scripts)
71+
This package is the heart of the project, which contains the scripts for setting up the development server, building production builds, configuring all software used, etc.<br>
72+
All functionality must be retained (and configuration given to the user) if they choose to eject.
73+
4474
## Setting Up a Local Copy
4575

4676
1. Clone the repo with `git clone https://github.com/facebookincubator/create-react-app`
@@ -58,6 +88,8 @@ cd my-app
5888

5989
and then run `npm start` or `npm run build`.
6090

91+
*Note: if you are using yarn, we suggest that you use `yarn install --no-lockfile` instead of the bare `yarn` or `yarn install` because we [intentionally](https://github.com/facebookincubator/create-react-app/pull/2014#issuecomment-300811661) do not ignore or add yarn.lock to our repo.*
92+
6193
## Cutting a Release
6294

6395
1. Tag all merged pull requests that go into the release with the relevant milestone. Each merged PR should also be labeled with one of the [labels](https://github.com/facebookincubator/create-react-app/labels) named `tag: ...` to indicate what kind of change it is.

PULL_REQUEST_TEMPLATE.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!--
2+
Thank you for sending the PR!
3+
If you changed any code, there are just two more things to do:
4+
5+
* Provide us with clear instructions on how you verified your changes work. Bonus points for screenshots!
6+
7+
Happy contributing!
8+
-->

README.md

+26-11
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Create React apps with no build configuration.
88
Create React App works on macOS, Windows, and Linux.<br>
99
If something doesn’t work please [file an issue](https://github.com/facebookincubator/create-react-app/issues/new).
1010

11-
## tl;dr
11+
## Quick Overview
1212

1313
```sh
1414
npm install -g create-react-app
@@ -23,6 +23,13 @@ When you’re ready to deploy to production, create a minified bundle with `npm
2323

2424
<img src='https://camo.githubusercontent.com/506a5a0a33aebed2bf0d24d3999af7f582b31808/687474703a2f2f692e696d6775722e636f6d2f616d794e66434e2e706e67' width='600' alt='npm start'>
2525

26+
### Get Started Immediately
27+
28+
You **don’t** need to install or configure tools like Webpack or Babel.<br>
29+
They are preconfigured and hidden so that you can focus on the code.
30+
31+
Just create a project, and you’re good to go.
32+
2633
## Getting Started
2734

2835
### Installation
@@ -33,11 +40,9 @@ Install it once globally:
3340
npm install -g create-react-app
3441
```
3542

36-
**You’ll need to have Node >= 4 on your machine**.
37-
38-
**We strongly recommend to use Node >= 6 and npm >= 3 for faster installation speed and better disk usage.** You can use [nvm](https://github.com/creationix/nvm#usage) to easily switch Node versions between different projects.
43+
**You’ll need to have Node >= 6 on your machine**. You can use [nvm](https://github.com/creationix/nvm#usage) to easily switch Node versions between different projects.
3944

40-
**This tool doesn’t assume a Node backend**. The Node installation is only required for the build tools that rely on it locally, such as Webpack and Babel.
45+
**This tool doesn’t assume a Node backend**. The Node installation is only required for Create React App itself.
4146

4247
### Creating an App
4348

@@ -60,13 +65,15 @@ my-app/
6065
public/
6166
favicon.ico
6267
index.html
68+
manifest.json
6369
src/
6470
App.css
6571
App.js
6672
App.test.js
6773
index.css
6874
index.js
6975
logo.svg
76+
registerServiceWorker.js
7077
```
7178

7279
No configuration or complicated folder structures, just the files you need to build your app.<br>
@@ -85,7 +92,7 @@ You will see the build errors and lint warnings in the console.
8592
### `npm test` or `yarn test`
8693

8794
Runs the test watcher in an interactive mode.<br>
88-
By default, runs tests related to files changes since the last commit.
95+
By default, runs tests related to files changed since the last commit.
8996

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

@@ -95,7 +102,9 @@ Builds the app for production to the `build` folder.<br>
95102
It correctly bundles React in production mode and optimizes the build for the best performance.
96103

97104
The build is minified and the filenames include the hashes.<br>
98-
Your app is ready to be deployed!
105+
By default, it also [includes a service worker](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app) so that your app loads from local cache on future visits.
106+
107+
Your app is ready to be deployed.
99108

100109
## User Guide
101110

@@ -111,10 +120,11 @@ The [User Guide](https://github.com/facebookincubator/create-react-app/blob/mast
111120
- [Changing the Page `<title>`](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#changing-the-page-title)
112121
- [Installing a Dependency](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#installing-a-dependency)
113122
- [Importing a Component](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#importing-a-component)
123+
- [Code Splitting](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting)
114124
- [Adding a Stylesheet](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-stylesheet)
115125
- [Post-Processing CSS](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#post-processing-css)
116126
- [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)
117-
- [Adding Images and Fonts](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-images-and-fonts)
127+
- [Adding Images, Fonts, and Files](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-images-fonts-and-files)
118128
- [Using the `public` Folder](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder)
119129
- [Using Global Variables](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-global-variables)
120130
- [Adding Bootstrap](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-bootstrap)
@@ -127,7 +137,6 @@ The [User Guide](https://github.com/facebookincubator/create-react-app/blob/mast
127137
- [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)
128138
- [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)
129139
- [Running Tests](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests)
130-
- [Developing Components in Isolation](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#developing-components-in-isolation)
131140
- [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)
132141
- [Deployment](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#deployment)
133142
- [Advanced Configuration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration)
@@ -143,7 +152,7 @@ Please refer to the [User Guide](https://github.com/facebookincubator/create-rea
143152

144153
* **One Dependency:** There is just one build dependency. It uses Webpack, Babel, ESLint, and other amazing projects, but provides a cohesive curated experience on top of them.
145154

146-
* **Convention over Configuration:** You don't need to configure anything by default. Reasonably good configuration of both development and production builds is handled for you so you can focus on writing code.
155+
* **No Configuration Required:** You don't need to configure anything. Reasonably good configuration of both development and production builds is handled for you so you can focus on writing code.
147156

148157
* **No Lock-In:** You can “eject” to a custom setup at any time. Run a single command, and all the configuration and build dependencies will be moved directly into your project, so you can pick up right where you left off.
149158

@@ -157,6 +166,7 @@ Please refer to the [User Guide](https://github.com/facebookincubator/create-rea
157166
* Import CSS and image files directly from JavaScript.
158167
* Autoprefixed CSS, so you don’t need `-webkit` or other prefixes.
159168
* A `build` script to bundle JS, CSS, and images for production, with sourcemaps.
169+
* An offline-first [service worker](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers) and a [web app manifest](https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/), meeting all the [Progressive Web App](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app) criteria.
160170

161171
**The feature set is intentionally limited**. It doesn’t support advanced features such as server rendering or CSS modules. The tool is also **non-configurable** because it is hard to provide a cohesive experience and easy updates across a set of tools when the user can tweak anything.
162172

@@ -202,6 +212,11 @@ All of them are transitive dependencies of the provided npm package.
202212

203213
We'd love to have your helping hand on `create-react-app`! See [CONTRIBUTING.md](CONTRIBUTING.md) for more information on what we're looking for and how to get started.
204214

215+
## React Native
216+
217+
Looking for something similar, but for React Native?<br>
218+
Check out [Create React Native App](https://github.com/react-community/create-react-native-app/).
219+
205220
## Acknowledgements
206221

207222
We are grateful to the authors of existing related projects for their ideas and collaboration:
@@ -231,7 +246,7 @@ Notable alternatives also include:
231246
* [aik](https://github.com/d4rkr00t/aik)
232247
* [react-app](https://github.com/kriasoft/react-app)
233248
* [dev-toolkit](https://github.com/stoikerty/dev-toolkit)
234-
* [tarec](https://github.com/geowarin/tarec)
249+
* [sku](https://github.com/seek-oss/sku)
235250

236251
You can also use module bundlers like [webpack](http://webpack.github.io) and [Browserify](http://browserify.org/) directly.<br>
237252
React documentation includes [a walkthrough](https://facebook.github.io/react/docs/package-management.html) on this topic.

appveyor.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
image: Visual Studio 2017
2+
13
environment:
24
matrix:
35
- nodejs_version: 7
@@ -12,12 +14,6 @@ environment:
1214
test_suite: "installs"
1315
- nodejs_version: 6
1416
test_suite: "kitchensink"
15-
- nodejs_version: 4
16-
test_suite: "simple"
17-
- nodejs_version: 4
18-
test_suite: "installs"
19-
- nodejs_version: 4
20-
test_suite: "kitchensink"
2117

2218
cache:
2319
- node_modules -> appveyor.cleanup-cache.txt
@@ -32,6 +28,8 @@ platform:
3228
- x64
3329

3430
install:
31+
# TODO: Remove after https://github.com/appveyor/ci/issues/1426 is fixed
32+
- set PATH=C:\Program Files\Git\mingw64\bin;%PATH%
3533
- ps: Install-Product node $env:nodejs_version $env:platform
3634

3735
build: off

package.json

+15-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,25 @@
55
"changelog": "lerna-changelog",
66
"create-react-app": "tasks/cra.sh",
77
"e2e": "tasks/e2e-simple.sh",
8-
"postinstall": "lerna bootstrap",
8+
"postinstall": "lerna bootstrap && cd packages/react-error-overlay/ && npm run build:prod",
99
"publish": "tasks/release.sh",
1010
"start": "node packages/react-scripts/scripts/start.js",
11-
"test": "node packages/react-scripts/scripts/test.js --env=jsdom"
11+
"test": "node packages/react-scripts/scripts/test.js --env=jsdom",
12+
"format": "prettier --trailing-comma es5 --single-quote --write 'packages/*/*.js' 'packages/*/!(node_modules)/**/*.js'",
13+
"precommit": "lint-staged"
1214
},
1315
"devDependencies": {
14-
"eslint": "3.16.1",
16+
"eslint": "3.19.0",
17+
"husky": "^0.13.2",
1518
"lerna": "2.0.0-beta.38",
16-
"lerna-changelog": "^0.2.3"
19+
"lerna-changelog": "^0.2.3",
20+
"lint-staged": "^3.3.1",
21+
"prettier": "^0.21.0"
22+
},
23+
"lint-staged": {
24+
"*.js": [
25+
"prettier --trailing-comma es5 --single-quote --write",
26+
"git add"
27+
]
1728
}
1829
}

0 commit comments

Comments
 (0)