Skip to content

Commit 0b57f5e

Browse files
committed
Merge branch 'master' into static-folder
2 parents fd41c2d + 6a830a5 commit 0b57f5e

21 files changed

+584
-317
lines changed

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
## 0.2.0 (July 28, 2016)
2+
3+
### Build Dependency (`react-scripts`)
4+
5+
* You can now enable deployment to GitHub Pages by adding `homepage` field to `package.json` ([@dhruska](https://github.com/dhruska) in [#94](https://github.com/facebookincubator/create-react-app/pull/94))
6+
* Development server now runs on `0.0.0.0` and works with VirtualBox ([@JWo1F](https://github.com/JWo1F) in [#128](https://github.com/facebookincubator/create-react-app/pull/128))
7+
* Cloud9 and Nitrous online IDEs are now supported ([@gaearon](http://github.com/gaearon) in [2fe84e](https://github.com/facebookincubator/create-react-app/commit/2fe84ecded55f1d5258d91f9c2c07698ae0d2fb4))
8+
* When `3000` port is taken, we offer to use another port ([@chocnut](https://github.com/chocnut) in [#101](https://github.com/facebookincubator/create-react-app/pull/101), [2edf21](https://github.com/facebookincubator/create-react-app/commit/2edf2180f2aa6bf647807d0b1fcd95f4cfe4a558))
9+
* You can now `import` CSS files from npm modules ([@glennreyes](https://github.com/glennreyes) in [#105](https://github.com/facebookincubator/create-react-app/pull/105), [@breaddevil](https://github.com/breaddevil) in [#178](https://github.com/facebookincubator/create-react-app/pull/178))
10+
* `fetch` and `Promise` polyfills are now always included ([@gaearon](https://github.com/gaearon) in [#235](https://github.com/facebookincubator/create-react-app/pull/235))
11+
* Regenerator runtime is now included if you use ES6 generators ([@gaearon](https://github.com/gaearon) in [#238](https://github.com/facebookincubator/create-react-app/pull/238))
12+
* Generated project now contains `.gitignore` ([@npverni](https://github.com/npverni) in [#79](https://github.com/facebookincubator/create-react-app/pull/79), [@chibicode](https://github.com/chibicode) in [#112](https://github.com/facebookincubator/create-react-app/pull/112))
13+
* ESLint config is now more compatible with Flow ([@gaearon](https://github.com/gaearon) in [#261](https://github.com/facebookincubator/create-react-app/pull/261))
14+
* A stylistic lint rule about method naming has been removed ([@mxstbr](https://github.com/mxstbr) in [#152](https://github.com/facebookincubator/create-react-app/pull/157))
15+
* A few unobtrusive accessibility lint rules have been added ([@evcohen](https://github.com/evcohen) in [#175](https://github.com/facebookincubator/create-react-app/pull/175))
16+
* A `.babelrc` in parent directory no longer causes an error ([@alexzherdev](https://github.com/alexzherdev) in [#236](https://github.com/facebookincubator/create-react-app/pull/236))
17+
* Files with `.json` extension are now discovered ([@gaearon](https://github.com/gaearon) in [a11d6a](https://github.com/facebookincubator/create-react-app/commit/a11d6a398f487f9163880dd34667b1d3e14b147a))
18+
* Bug fixes from transitive dependencies are included ([#126](https://github.com/facebookincubator/create-react-app/issues/126))
19+
* Linting now works with IDEs if you follow [these](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#display-lint-output-in-the-editor) instructions ([@keyanzhang](https://github.com/keyanzhang) in [#149](https://github.com/facebookincubator/create-react-app/pull/149))
20+
* After building, we now print gzipped bundle size ([@lvwrence](https://github.com/lvwrence) in [#229](https://github.com/facebookincubator/create-react-app/pull/229))
21+
22+
### Global CLI (`create-react-app`)
23+
24+
* It enforces that you have Node >= 4 ([@conorhastings](https://github.com/conorhastings) in [#88](https://github.com/facebookincubator/create-react-app/pull/88))
25+
* It handles `--version` flag correctly ([@mxstbr](https://github.com/mxstbr) in [#152](https://github.com/facebookincubator/create-react-app/pull/152))
26+
27+
### Migrating from 0.1.0 to 0.2.0
28+
29+
You may optionally update the global command (it’s not required):
30+
31+
```
32+
npm install -g [email protected]
33+
```
34+
35+
Inside any created project that has not been ejected, run:
36+
37+
```
38+
npm install --save-dev --save-exact [email protected]
39+
```
40+
41+
You may need to fix a few lint warnings about missing `<img alt>` tag, but everything else should work out of the box. If you intend to deploy your site to GitHub Pages, you may now [add `homepage` field to `package.json`](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#deploy-to-github-pages). If you had [issues with integrating editor linter plugins](https://github.com/facebookincubator/create-react-app/issues/124), follow [these new instructions](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#display-lint-output-in-the-editor).
42+
143
## 0.1.0 (July 22, 2016)
244

345
* Initial public release

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ my-app/
5151
favicon.ico
5252
node_modules/
5353
package.json
54+
.gitignore
5455
src/
5556
App.css
5657
App.js
@@ -169,6 +170,8 @@ If you don’t agree with the choices made in this project, you might want to ex
169170
* [quik](https://github.com/satya164/quik)
170171
* [sagui](https://github.com/saguijs/sagui)
171172
* [roc](https://github.com/rocjs/roc)
173+
* [aik](https://github.com/d4rkr00t/aik)
174+
* [react-app](https://github.com/kriasoft/react-app)
172175

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

bin/react-scripts.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ switch (script) {
77
case 'build':
88
case 'start':
99
case 'eject':
10-
spawn(
10+
var result = spawn.sync(
1111
'node',
1212
[require.resolve('../scripts/' + script)].concat(args),
1313
{stdio: 'inherit'}
1414
);
15+
process.exit(result.status);
1516
break;
1617
default:
1718
console.log('Unknown script "' + script + '".');

config/babel.dev.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
module.exports = {
11+
babelrc: false,
1112
cacheDirectory: true,
1213
presets: [
1314
'babel-preset-es2015',
@@ -18,5 +19,11 @@ module.exports = {
1819
'babel-plugin-syntax-trailing-function-commas',
1920
'babel-plugin-transform-class-properties',
2021
'babel-plugin-transform-object-rest-spread'
21-
].map(require.resolve)
22+
].map(require.resolve).concat([
23+
[require.resolve('babel-plugin-transform-runtime'), {
24+
helpers: false,
25+
polyfill: false,
26+
regenerator: true
27+
}]
28+
])
2229
};

config/babel.prod.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
module.exports = {
11+
babelrc: false,
1112
presets: [
1213
'babel-preset-es2015',
1314
'babel-preset-es2016',
@@ -17,6 +18,12 @@ module.exports = {
1718
'babel-plugin-syntax-trailing-function-commas',
1819
'babel-plugin-transform-class-properties',
1920
'babel-plugin-transform-object-rest-spread',
20-
'babel-plugin-transform-react-constant-elements'
21-
].map(require.resolve)
21+
'babel-plugin-transform-react-constant-elements',
22+
].map(require.resolve).concat([
23+
[require.resolve('babel-plugin-transform-runtime'), {
24+
helpers: false,
25+
polyfill: false,
26+
regenerator: true
27+
}]
28+
])
2229
};

config/eslint.js

Lines changed: 112 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,19 @@
1616
// In the future, we might create a separate list of rules for production.
1717
// It would probably be more strict.
1818

19-
var WARNING = 1;
20-
2119
module.exports = {
2220
root: true,
2321

2422
parser: 'babel-eslint',
2523

2624
// import plugin is termporarily disabled, scroll below to see why
27-
plugins: ['react'/*, 'import'*/, 'jsx-a11y'],
25+
plugins: [/*'import', */'flowtype', 'jsx-a11y', 'react'],
2826

2927
env: {
30-
es6: true,
28+
browser: true,
3129
commonjs: true,
32-
browser: true
30+
es6: true,
31+
node: true
3332
},
3433

3534
parserOptions: {
@@ -57,40 +56,40 @@ module.exports = {
5756

5857
rules: {
5958
// http://eslint.org/docs/rules/
60-
'array-callback-return': WARNING,
61-
'default-case': [WARNING, { commentPattern: '^no default$' }],
62-
'dot-location': [WARNING, 'property'],
63-
eqeqeq: [WARNING, 'allow-null'],
64-
'guard-for-in': WARNING,
65-
'new-cap': [WARNING, { newIsCap: true }],
66-
'new-parens': WARNING,
67-
'no-array-constructor': WARNING,
68-
'no-caller': WARNING,
69-
'no-cond-assign': [WARNING, 'always'],
70-
'no-const-assign': WARNING,
71-
'no-control-regex': WARNING,
72-
'no-delete-var': WARNING,
73-
'no-dupe-args': WARNING,
74-
'no-dupe-class-members': WARNING,
75-
'no-dupe-keys': WARNING,
76-
'no-duplicate-case': WARNING,
77-
'no-empty-character-class': WARNING,
78-
'no-empty-pattern': WARNING,
79-
'no-eval': WARNING,
80-
'no-ex-assign': WARNING,
81-
'no-extend-native': WARNING,
82-
'no-extra-bind': WARNING,
83-
'no-extra-label': WARNING,
84-
'no-fallthrough': WARNING,
85-
'no-func-assign': WARNING,
86-
'no-implied-eval': WARNING,
87-
'no-invalid-regexp': WARNING,
88-
'no-iterator': WARNING,
89-
'no-label-var': WARNING,
90-
'no-labels': [WARNING, { allowLoop: false, allowSwitch: false }],
91-
'no-lone-blocks': WARNING,
92-
'no-loop-func': WARNING,
93-
'no-mixed-operators': [WARNING, {
59+
'array-callback-return': 'warn',
60+
'default-case': ['warn', { commentPattern: '^no default$' }],
61+
'dot-location': ['warn', 'property'],
62+
eqeqeq: ['warn', 'allow-null'],
63+
'guard-for-in': 'warn',
64+
'new-cap': ['warn', { newIsCap: true }],
65+
'new-parens': 'warn',
66+
'no-array-constructor': 'warn',
67+
'no-caller': 'warn',
68+
'no-cond-assign': ['warn', 'always'],
69+
'no-const-assign': 'warn',
70+
'no-control-regex': 'warn',
71+
'no-delete-var': 'warn',
72+
'no-dupe-args': 'warn',
73+
'no-dupe-class-members': 'warn',
74+
'no-dupe-keys': 'warn',
75+
'no-duplicate-case': 'warn',
76+
'no-empty-character-class': 'warn',
77+
'no-empty-pattern': 'warn',
78+
'no-eval': 'warn',
79+
'no-ex-assign': 'warn',
80+
'no-extend-native': 'warn',
81+
'no-extra-bind': 'warn',
82+
'no-extra-label': 'warn',
83+
'no-fallthrough': 'warn',
84+
'no-func-assign': 'warn',
85+
'no-implied-eval': 'warn',
86+
'no-invalid-regexp': 'warn',
87+
'no-iterator': 'warn',
88+
'no-label-var': 'warn',
89+
'no-labels': ['warn', { allowLoop: false, allowSwitch: false }],
90+
'no-lone-blocks': 'warn',
91+
'no-loop-func': 'warn',
92+
'no-mixed-operators': ['warn', {
9493
groups: [
9594
['&', '|', '^', '~', '<<', '>>', '>>>'],
9695
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
@@ -99,58 +98,58 @@ module.exports = {
9998
],
10099
allowSamePrecedence: false
101100
}],
102-
'no-multi-str': WARNING,
103-
'no-native-reassign': WARNING,
104-
'no-negated-in-lhs': WARNING,
105-
'no-new-func': WARNING,
106-
'no-new-object': WARNING,
107-
'no-new-symbol': WARNING,
108-
'no-new-wrappers': WARNING,
109-
'no-obj-calls': WARNING,
110-
'no-octal': WARNING,
111-
'no-octal-escape': WARNING,
112-
'no-redeclare': WARNING,
113-
'no-regex-spaces': WARNING,
101+
'no-multi-str': 'warn',
102+
'no-native-reassign': 'warn',
103+
'no-negated-in-lhs': 'warn',
104+
'no-new-func': 'warn',
105+
'no-new-object': 'warn',
106+
'no-new-symbol': 'warn',
107+
'no-new-wrappers': 'warn',
108+
'no-obj-calls': 'warn',
109+
'no-octal': 'warn',
110+
'no-octal-escape': 'warn',
111+
'no-redeclare': 'warn',
112+
'no-regex-spaces': 'warn',
114113
'no-restricted-syntax': [
115-
WARNING,
114+
'warn',
116115
'LabeledStatement',
117116
'WithStatement',
118117
],
119-
'no-return-assign': WARNING,
120-
'no-script-url': WARNING,
121-
'no-self-assign': WARNING,
122-
'no-self-compare': WARNING,
123-
'no-sequences': WARNING,
124-
'no-shadow-restricted-names': WARNING,
125-
'no-sparse-arrays': WARNING,
126-
'no-this-before-super': WARNING,
127-
'no-throw-literal': WARNING,
128-
'no-undef': WARNING,
129-
'no-unexpected-multiline': WARNING,
130-
'no-unreachable': WARNING,
131-
'no-unused-expressions': WARNING,
132-
'no-unused-labels': WARNING,
133-
'no-unused-vars': [WARNING, { vars: 'local', args: 'none' }],
134-
'no-use-before-define': [WARNING, 'nofunc'],
135-
'no-useless-computed-key': WARNING,
136-
'no-useless-concat': WARNING,
137-
'no-useless-constructor': WARNING,
138-
'no-useless-escape': WARNING,
139-
'no-useless-rename': [WARNING, {
118+
'no-return-assign': 'warn',
119+
'no-script-url': 'warn',
120+
'no-self-assign': 'warn',
121+
'no-self-compare': 'warn',
122+
'no-sequences': 'warn',
123+
'no-shadow-restricted-names': 'warn',
124+
'no-sparse-arrays': 'warn',
125+
'no-this-before-super': 'warn',
126+
'no-throw-literal': 'warn',
127+
'no-undef': 'warn',
128+
'no-unexpected-multiline': 'warn',
129+
'no-unreachable': 'warn',
130+
'no-unused-expressions': 'warn',
131+
'no-unused-labels': 'warn',
132+
'no-unused-vars': ['warn', { vars: 'local', args: 'none' }],
133+
'no-use-before-define': ['warn', 'nofunc'],
134+
'no-useless-computed-key': 'warn',
135+
'no-useless-concat': 'warn',
136+
'no-useless-constructor': 'warn',
137+
'no-useless-escape': 'warn',
138+
'no-useless-rename': ['warn', {
140139
ignoreDestructuring: false,
141140
ignoreImport: false,
142141
ignoreExport: false,
143142
}],
144-
'no-with': WARNING,
145-
'no-whitespace-before-property': WARNING,
146-
'operator-assignment': [WARNING, 'always'],
147-
radix: WARNING,
148-
'require-yield': WARNING,
149-
'rest-spread-spacing': [WARNING, 'never'],
150-
strict: [WARNING, 'never'],
151-
'unicode-bom': [WARNING, 'never'],
152-
'use-isnan': WARNING,
153-
'valid-typeof': WARNING,
143+
'no-with': 'warn',
144+
'no-whitespace-before-property': 'warn',
145+
'operator-assignment': ['warn', 'always'],
146+
radix: 'warn',
147+
'require-yield': 'warn',
148+
'rest-spread-spacing': ['warn', 'never'],
149+
strict: ['warn', 'never'],
150+
'unicode-bom': ['warn', 'never'],
151+
'use-isnan': 'warn',
152+
'valid-typeof': 'warn',
154153

155154
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/
156155

@@ -165,37 +164,42 @@ module.exports = {
165164
// When file A is saved, we want to invalidate all files that import it
166165
// *and* that currently have lint errors. This should fix the problem.
167166

168-
// 'import/default': WARNING,
169-
// 'import/export': WARNING,
170-
// 'import/named': WARNING,
171-
// 'import/namespace': WARNING,
172-
// 'import/no-amd': WARNING,
173-
// 'import/no-duplicates': WARNING,
174-
// 'import/no-extraneous-dependencies': WARNING,
175-
// 'import/no-named-as-default': WARNING,
176-
// 'import/no-named-as-default-member': WARNING,
177-
// 'import/no-unresolved': [WARNING, { commonjs: true }],
167+
// 'import/default': 'warn',
168+
// 'import/export': 'warn',
169+
// 'import/named': 'warn',
170+
// 'import/namespace': 'warn',
171+
// 'import/no-amd': 'warn',
172+
// 'import/no-duplicates': 'warn',
173+
// 'import/no-extraneous-dependencies': 'warn',
174+
// 'import/no-named-as-default': 'warn',
175+
// 'import/no-named-as-default-member': 'warn',
176+
// 'import/no-unresolved': ['warn', { commonjs: true }],
178177

179178
// https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules
180-
'react/jsx-equals-spacing': [WARNING, 'never'],
181-
'react/jsx-no-duplicate-props': [WARNING, { ignoreCase: true }],
182-
'react/jsx-no-undef': WARNING,
183-
'react/jsx-pascal-case': [WARNING, {
179+
'react/jsx-equals-spacing': ['warn', 'never'],
180+
'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }],
181+
'react/jsx-no-undef': 'warn',
182+
'react/jsx-pascal-case': ['warn', {
184183
allowAllCaps: true,
185184
ignore: [],
186185
}],
187-
'react/jsx-uses-react': WARNING,
188-
'react/jsx-uses-vars': WARNING,
189-
'react/no-deprecated': WARNING,
190-
'react/no-direct-mutation-state': WARNING,
191-
'react/no-is-mounted': WARNING,
192-
'react/react-in-jsx-scope': WARNING,
193-
'react/require-render-return': WARNING,
186+
'react/jsx-uses-react': 'warn',
187+
'react/jsx-uses-vars': 'warn',
188+
'react/no-deprecated': 'warn',
189+
'react/no-direct-mutation-state': 'warn',
190+
'react/no-is-mounted': 'warn',
191+
'react/react-in-jsx-scope': 'warn',
192+
'react/require-render-return': 'warn',
194193

195194
// https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules
196-
'jsx-a11y/aria-role': WARNING,
197-
'jsx-a11y/img-has-alt': WARNING,
198-
'jsx-a11y/img-redundant-alt': WARNING,
199-
'jsx-a11y/no-access-key': WARNING
195+
'jsx-a11y/aria-role': 'warn',
196+
'jsx-a11y/img-has-alt': 'warn',
197+
'jsx-a11y/img-redundant-alt': 'warn',
198+
'jsx-a11y/no-access-key': 'warn',
199+
200+
// https://github.com/gajus/eslint-plugin-flowtype
201+
'flowtype/define-flow-type': 'warn',
202+
'flowtype/require-valid-file-annotation': 'warn',
203+
'flowtype/use-flow-type': 'warn'
200204
}
201205
};

0 commit comments

Comments
 (0)