diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md similarity index 100% rename from ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE.md diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/README.md b/README.md index 8cd74f24f86..06a2fbf4df9 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ Some of them might get added in the future if they are stable, are useful to maj The tools used by Create React App are subject to change. Currently it is a thin layer on top of many amazing community projects, such as: -* [webpack](https://webpack.github.io/) with [webpack-dev-server](https://github.com/webpack/webpack-dev-server), [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin) and [style-loader](https://github.com/webpack/style-loader) +* [webpack](https://webpack.js.org/) with [webpack-dev-server](https://github.com/webpack/webpack-dev-server), [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin) and [style-loader](https://github.com/webpack/style-loader) * [Babel](http://babeljs.io/) with ES6 and extensions used by Facebook (JSX, [object spread](https://github.com/sebmarkbage/ecmascript-rest-spread/commits/master), [class properties](https://github.com/jeffmo/es-class-public-fields)) * [Autoprefixer](https://github.com/postcss/autoprefixer) * [ESLint](http://eslint.org/) @@ -248,5 +248,5 @@ Notable alternatives also include: * [dev-toolkit](https://github.com/stoikerty/dev-toolkit) * [sku](https://github.com/seek-oss/sku) -You can also use module bundlers like [webpack](http://webpack.github.io) and [Browserify](http://browserify.org/) directly.
+You can also use module bundlers like [webpack](http://webpack.js.org) and [Browserify](http://browserify.org/) directly.
React documentation includes [a walkthrough](https://facebook.github.io/react/docs/package-management.html) on this topic. diff --git a/packages/react-dev-utils/WebpackDevServerUtils.js b/packages/react-dev-utils/WebpackDevServerUtils.js index 51a0feb56f3..9c03af40dd8 100644 --- a/packages/react-dev-utils/WebpackDevServerUtils.js +++ b/packages/react-dev-utils/WebpackDevServerUtils.js @@ -13,7 +13,7 @@ const fs = require('fs'); const path = require('path'); const url = require('url'); const chalk = require('chalk'); -const detect = require('@timer/detect-port'); +const detect = require('detect-port-alt'); const inquirer = require('inquirer'); const clearConsole = require('./clearConsole'); const formatWebpackMessages = require('./formatWebpackMessages'); diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json index 46f3a92033a..9a7a61119ab 100644 --- a/packages/react-dev-utils/package.json +++ b/packages/react-dev-utils/package.json @@ -33,12 +33,12 @@ "webpackHotDevClient.js" ], "dependencies": { - "@timer/detect-port": "1.1.3", "address": "1.0.1", "anser": "1.3.0", "babel-code-frame": "6.22.0", "chalk": "1.1.3", "cross-spawn": "4.0.2", + "detect-port-alt": "1.1.3", "escape-string-regexp": "1.0.5", "filesize": "3.3.0", "gzip-size": "3.0.0", diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index adf92f5b124..55d3b6ad74c 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -249,6 +249,8 @@ module.exports = { inject: true, template: paths.appHtml, }), + // Add module names to factory functions so they appear in browser profiler. + new webpack.NamedModulesPlugin(), // Makes some environment variables available to the JS code, for example: // if (process.env.NODE_ENV === 'development') { ... }. See `./env.js`. new webpack.DefinePlugin(env.stringified), diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index 080329cffad..de8e5b44ab8 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -690,7 +690,7 @@ To add Flow to a Create React App project, follow these steps: 1. Run `npm install --save-dev flow-bin` (or `yarn add --dev flow-bin`). 2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. -3. Run `npm run flow -- init` (or `yarn flow -- init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. +3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. 4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors. @@ -1082,7 +1082,7 @@ The watcher includes an interactive command-line interface with the ability to r ### Version Control Integration -By default, when you run `npm test`, Jest will only run the tests related to files changed since the last commit. This is an optimization designed to make your tests runs fast regardless of how many tests you have. However it assumes that you don’t often commit the code that doesn’t pass the tests. +By default, when you run `npm test`, Jest will only run the tests related to files changed since the last commit. This is an optimization designed to make your tests run fast regardless of how many tests you have. However it assumes that you don’t often commit the code that doesn’t pass the tests. Jest will always explicitly mention that it only ran tests related to the files changed since the last commit. You can also press `a` in the watch mode to force Jest to run all tests. @@ -1244,7 +1244,6 @@ Popular CI servers already set the environment variable `CI` by default but you ``` language: node_js node_js: - - 4 - 6 cache: directories: @@ -1322,30 +1321,30 @@ If you use [Visual Studio Code](https://code.visualstudio.com), there is a [Jest ![VS Code Jest Preview](https://cloud.githubusercontent.com/assets/49038/20795349/a032308a-b7c8-11e6-9b34-7eeac781003f.png) - +* [GitHub Repo](https://github.com/storybooks/storybook) +* [Documentation](https://storybook.js.org/basics/introduction/) +* [Snapshot Testing UI](https://github.com/storybooks/storybook/tree/master/addons/storyshots) with Storybook + addon/storyshot ## Making a Progressive Web App diff --git a/packages/react-scripts/template/src/index.js b/packages/react-scripts/template/src/index.js index 53c768842ca..fae3e3500cf 100644 --- a/packages/react-scripts/template/src/index.js +++ b/packages/react-scripts/template/src/index.js @@ -1,8 +1,8 @@ import React from 'react'; import ReactDOM from 'react-dom'; +import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; -import './index.css'; ReactDOM.render(, document.getElementById('root')); registerServiceWorker();