Skip to content

Commit

Permalink
Merge branch 'master' into static-folder
Browse files Browse the repository at this point in the history
  • Loading branch information
mxstbr committed Jul 30, 2016
2 parents fd41c2d + 6a830a5 commit 0b57f5e
Show file tree
Hide file tree
Showing 21 changed files with 584 additions and 317 deletions.
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
## 0.2.0 (July 28, 2016)

### Build Dependency (`react-scripts`)

* 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))
* 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))
* Cloud9 and Nitrous online IDEs are now supported ([@gaearon](http://github.com/gaearon) in [2fe84e](https://github.com/facebookincubator/create-react-app/commit/2fe84ecded55f1d5258d91f9c2c07698ae0d2fb4))
* 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))
* 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))
* `fetch` and `Promise` polyfills are now always included ([@gaearon](https://github.com/gaearon) in [#235](https://github.com/facebookincubator/create-react-app/pull/235))
* 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))
* 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))
* ESLint config is now more compatible with Flow ([@gaearon](https://github.com/gaearon) in [#261](https://github.com/facebookincubator/create-react-app/pull/261))
* 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))
* 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))
* 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))
* Files with `.json` extension are now discovered ([@gaearon](https://github.com/gaearon) in [a11d6a](https://github.com/facebookincubator/create-react-app/commit/a11d6a398f487f9163880dd34667b1d3e14b147a))
* Bug fixes from transitive dependencies are included ([#126](https://github.com/facebookincubator/create-react-app/issues/126))
* 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))
* After building, we now print gzipped bundle size ([@lvwrence](https://github.com/lvwrence) in [#229](https://github.com/facebookincubator/create-react-app/pull/229))

### Global CLI (`create-react-app`)

* It enforces that you have Node >= 4 ([@conorhastings](https://github.com/conorhastings) in [#88](https://github.com/facebookincubator/create-react-app/pull/88))
* It handles `--version` flag correctly ([@mxstbr](https://github.com/mxstbr) in [#152](https://github.com/facebookincubator/create-react-app/pull/152))

### Migrating from 0.1.0 to 0.2.0

You may optionally update the global command (it’s not required):

```
npm install -g [email protected]
```

Inside any created project that has not been ejected, run:

```
npm install --save-dev --save-exact [email protected]
```

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).

## 0.1.0 (July 22, 2016)

* Initial public release
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ my-app/
favicon.ico
node_modules/
package.json
.gitignore
src/
App.css
App.js
Expand Down Expand Up @@ -169,6 +170,8 @@ If you don’t agree with the choices made in this project, you might want to ex
* [quik](https://github.com/satya164/quik)
* [sagui](https://github.com/saguijs/sagui)
* [roc](https://github.com/rocjs/roc)
* [aik](https://github.com/d4rkr00t/aik)
* [react-app](https://github.com/kriasoft/react-app)

You can also use module bundlers like [webpack](http://webpack.github.io) and [Browserify](http://browserify.org/) directly.<br>
React documentation includes [a walkthrough](https://facebook.github.io/react/docs/package-management.html) on this topic.
3 changes: 2 additions & 1 deletion bin/react-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ switch (script) {
case 'build':
case 'start':
case 'eject':
spawn(
var result = spawn.sync(
'node',
[require.resolve('../scripts/' + script)].concat(args),
{stdio: 'inherit'}
);
process.exit(result.status);
break;
default:
console.log('Unknown script "' + script + '".');
Expand Down
9 changes: 8 additions & 1 deletion config/babel.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

module.exports = {
babelrc: false,
cacheDirectory: true,
presets: [
'babel-preset-es2015',
Expand All @@ -18,5 +19,11 @@ module.exports = {
'babel-plugin-syntax-trailing-function-commas',
'babel-plugin-transform-class-properties',
'babel-plugin-transform-object-rest-spread'
].map(require.resolve)
].map(require.resolve).concat([
[require.resolve('babel-plugin-transform-runtime'), {
helpers: false,
polyfill: false,
regenerator: true
}]
])
};
11 changes: 9 additions & 2 deletions config/babel.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

module.exports = {
babelrc: false,
presets: [
'babel-preset-es2015',
'babel-preset-es2016',
Expand All @@ -17,6 +18,12 @@ module.exports = {
'babel-plugin-syntax-trailing-function-commas',
'babel-plugin-transform-class-properties',
'babel-plugin-transform-object-rest-spread',
'babel-plugin-transform-react-constant-elements'
].map(require.resolve)
'babel-plugin-transform-react-constant-elements',
].map(require.resolve).concat([
[require.resolve('babel-plugin-transform-runtime'), {
helpers: false,
polyfill: false,
regenerator: true
}]
])
};
220 changes: 112 additions & 108 deletions config/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,19 @@
// In the future, we might create a separate list of rules for production.
// It would probably be more strict.

var WARNING = 1;

module.exports = {
root: true,

parser: 'babel-eslint',

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

env: {
es6: true,
browser: true,
commonjs: true,
browser: true
es6: true,
node: true
},

parserOptions: {
Expand Down Expand Up @@ -57,40 +56,40 @@ module.exports = {

rules: {
// http://eslint.org/docs/rules/
'array-callback-return': WARNING,
'default-case': [WARNING, { commentPattern: '^no default$' }],
'dot-location': [WARNING, 'property'],
eqeqeq: [WARNING, 'allow-null'],
'guard-for-in': WARNING,
'new-cap': [WARNING, { newIsCap: true }],
'new-parens': WARNING,
'no-array-constructor': WARNING,
'no-caller': WARNING,
'no-cond-assign': [WARNING, 'always'],
'no-const-assign': WARNING,
'no-control-regex': WARNING,
'no-delete-var': WARNING,
'no-dupe-args': WARNING,
'no-dupe-class-members': WARNING,
'no-dupe-keys': WARNING,
'no-duplicate-case': WARNING,
'no-empty-character-class': WARNING,
'no-empty-pattern': WARNING,
'no-eval': WARNING,
'no-ex-assign': WARNING,
'no-extend-native': WARNING,
'no-extra-bind': WARNING,
'no-extra-label': WARNING,
'no-fallthrough': WARNING,
'no-func-assign': WARNING,
'no-implied-eval': WARNING,
'no-invalid-regexp': WARNING,
'no-iterator': WARNING,
'no-label-var': WARNING,
'no-labels': [WARNING, { allowLoop: false, allowSwitch: false }],
'no-lone-blocks': WARNING,
'no-loop-func': WARNING,
'no-mixed-operators': [WARNING, {
'array-callback-return': 'warn',
'default-case': ['warn', { commentPattern: '^no default$' }],
'dot-location': ['warn', 'property'],
eqeqeq: ['warn', 'allow-null'],
'guard-for-in': 'warn',
'new-cap': ['warn', { newIsCap: true }],
'new-parens': 'warn',
'no-array-constructor': 'warn',
'no-caller': 'warn',
'no-cond-assign': ['warn', 'always'],
'no-const-assign': 'warn',
'no-control-regex': 'warn',
'no-delete-var': 'warn',
'no-dupe-args': 'warn',
'no-dupe-class-members': 'warn',
'no-dupe-keys': 'warn',
'no-duplicate-case': 'warn',
'no-empty-character-class': 'warn',
'no-empty-pattern': 'warn',
'no-eval': 'warn',
'no-ex-assign': 'warn',
'no-extend-native': 'warn',
'no-extra-bind': 'warn',
'no-extra-label': 'warn',
'no-fallthrough': 'warn',
'no-func-assign': 'warn',
'no-implied-eval': 'warn',
'no-invalid-regexp': 'warn',
'no-iterator': 'warn',
'no-label-var': 'warn',
'no-labels': ['warn', { allowLoop: false, allowSwitch: false }],
'no-lone-blocks': 'warn',
'no-loop-func': 'warn',
'no-mixed-operators': ['warn', {
groups: [
['&', '|', '^', '~', '<<', '>>', '>>>'],
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
Expand All @@ -99,58 +98,58 @@ module.exports = {
],
allowSamePrecedence: false
}],
'no-multi-str': WARNING,
'no-native-reassign': WARNING,
'no-negated-in-lhs': WARNING,
'no-new-func': WARNING,
'no-new-object': WARNING,
'no-new-symbol': WARNING,
'no-new-wrappers': WARNING,
'no-obj-calls': WARNING,
'no-octal': WARNING,
'no-octal-escape': WARNING,
'no-redeclare': WARNING,
'no-regex-spaces': WARNING,
'no-multi-str': 'warn',
'no-native-reassign': 'warn',
'no-negated-in-lhs': 'warn',
'no-new-func': 'warn',
'no-new-object': 'warn',
'no-new-symbol': 'warn',
'no-new-wrappers': 'warn',
'no-obj-calls': 'warn',
'no-octal': 'warn',
'no-octal-escape': 'warn',
'no-redeclare': 'warn',
'no-regex-spaces': 'warn',
'no-restricted-syntax': [
WARNING,
'warn',
'LabeledStatement',
'WithStatement',
],
'no-return-assign': WARNING,
'no-script-url': WARNING,
'no-self-assign': WARNING,
'no-self-compare': WARNING,
'no-sequences': WARNING,
'no-shadow-restricted-names': WARNING,
'no-sparse-arrays': WARNING,
'no-this-before-super': WARNING,
'no-throw-literal': WARNING,
'no-undef': WARNING,
'no-unexpected-multiline': WARNING,
'no-unreachable': WARNING,
'no-unused-expressions': WARNING,
'no-unused-labels': WARNING,
'no-unused-vars': [WARNING, { vars: 'local', args: 'none' }],
'no-use-before-define': [WARNING, 'nofunc'],
'no-useless-computed-key': WARNING,
'no-useless-concat': WARNING,
'no-useless-constructor': WARNING,
'no-useless-escape': WARNING,
'no-useless-rename': [WARNING, {
'no-return-assign': 'warn',
'no-script-url': 'warn',
'no-self-assign': 'warn',
'no-self-compare': 'warn',
'no-sequences': 'warn',
'no-shadow-restricted-names': 'warn',
'no-sparse-arrays': 'warn',
'no-this-before-super': 'warn',
'no-throw-literal': 'warn',
'no-undef': 'warn',
'no-unexpected-multiline': 'warn',
'no-unreachable': 'warn',
'no-unused-expressions': 'warn',
'no-unused-labels': 'warn',
'no-unused-vars': ['warn', { vars: 'local', args: 'none' }],
'no-use-before-define': ['warn', 'nofunc'],
'no-useless-computed-key': 'warn',
'no-useless-concat': 'warn',
'no-useless-constructor': 'warn',
'no-useless-escape': 'warn',
'no-useless-rename': ['warn', {
ignoreDestructuring: false,
ignoreImport: false,
ignoreExport: false,
}],
'no-with': WARNING,
'no-whitespace-before-property': WARNING,
'operator-assignment': [WARNING, 'always'],
radix: WARNING,
'require-yield': WARNING,
'rest-spread-spacing': [WARNING, 'never'],
strict: [WARNING, 'never'],
'unicode-bom': [WARNING, 'never'],
'use-isnan': WARNING,
'valid-typeof': WARNING,
'no-with': 'warn',
'no-whitespace-before-property': 'warn',
'operator-assignment': ['warn', 'always'],
radix: 'warn',
'require-yield': 'warn',
'rest-spread-spacing': ['warn', 'never'],
strict: ['warn', 'never'],
'unicode-bom': ['warn', 'never'],
'use-isnan': 'warn',
'valid-typeof': 'warn',

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

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

// 'import/default': WARNING,
// 'import/export': WARNING,
// 'import/named': WARNING,
// 'import/namespace': WARNING,
// 'import/no-amd': WARNING,
// 'import/no-duplicates': WARNING,
// 'import/no-extraneous-dependencies': WARNING,
// 'import/no-named-as-default': WARNING,
// 'import/no-named-as-default-member': WARNING,
// 'import/no-unresolved': [WARNING, { commonjs: true }],
// 'import/default': 'warn',
// 'import/export': 'warn',
// 'import/named': 'warn',
// 'import/namespace': 'warn',
// 'import/no-amd': 'warn',
// 'import/no-duplicates': 'warn',
// 'import/no-extraneous-dependencies': 'warn',
// 'import/no-named-as-default': 'warn',
// 'import/no-named-as-default-member': 'warn',
// 'import/no-unresolved': ['warn', { commonjs: true }],

// https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules
'react/jsx-equals-spacing': [WARNING, 'never'],
'react/jsx-no-duplicate-props': [WARNING, { ignoreCase: true }],
'react/jsx-no-undef': WARNING,
'react/jsx-pascal-case': [WARNING, {
'react/jsx-equals-spacing': ['warn', 'never'],
'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }],
'react/jsx-no-undef': 'warn',
'react/jsx-pascal-case': ['warn', {
allowAllCaps: true,
ignore: [],
}],
'react/jsx-uses-react': WARNING,
'react/jsx-uses-vars': WARNING,
'react/no-deprecated': WARNING,
'react/no-direct-mutation-state': WARNING,
'react/no-is-mounted': WARNING,
'react/react-in-jsx-scope': WARNING,
'react/require-render-return': WARNING,
'react/jsx-uses-react': 'warn',
'react/jsx-uses-vars': 'warn',
'react/no-deprecated': 'warn',
'react/no-direct-mutation-state': 'warn',
'react/no-is-mounted': 'warn',
'react/react-in-jsx-scope': 'warn',
'react/require-render-return': 'warn',

// https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules
'jsx-a11y/aria-role': WARNING,
'jsx-a11y/img-has-alt': WARNING,
'jsx-a11y/img-redundant-alt': WARNING,
'jsx-a11y/no-access-key': WARNING
'jsx-a11y/aria-role': 'warn',
'jsx-a11y/img-has-alt': 'warn',
'jsx-a11y/img-redundant-alt': 'warn',
'jsx-a11y/no-access-key': 'warn',

// https://github.com/gajus/eslint-plugin-flowtype
'flowtype/define-flow-type': 'warn',
'flowtype/require-valid-file-annotation': 'warn',
'flowtype/use-flow-type': 'warn'
}
};
Loading

0 comments on commit 0b57f5e

Please sign in to comment.