Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
Merge upstream changes from create-react-app 0.9.x (#84)
Browse files Browse the repository at this point in the history
* Heroku Deployment: Adds a note on how to resolve "File/Module Not Found Errors"  (facebook#1260)

* Adds note on how to resolve file or directory not found errors for heroku deployments

* Style tweaks

* Remove interactive shell check when opening browser on start (facebook#1264)

Browser launch can still be suppressed using BROWSER=none

* Only gitignore dirs in root, not deep (facebook#1267)

* facebookgh-1269: Enabling nested folder paths for project name (facebook#1270)

* facebookgh-1269: Enabling nested folder paths for project name

* facebookgh-1269: Added "fs-extra" and removed "path-exists"

* facebookgh-1269: Added e2e test cases to verify nested folder names

* Remove path-exists from dependencies and replace it with fs.existsSync (facebook#1289)

* Downgrading to compatible version of SockJS-Client (facebook#1274)

* Updated react-scripts babel-jest && jest packages to 18.0.0 (facebook#1311)

* Fixes duplicate "is" typo (facebook#1306)

* fix readme: remove double 'we' (facebook#1312)

* Use npm script hooks to avoid && in deploy script (facebook#1324)

* Bump babel-loader version (facebook#1009) (facebook#1309)

* Use yarnpkg alias to run Yarn (facebook#1365)

There’s a common tool included in Hadoop that also has a `yarn` command,
which created issues for users who had Hadoop installed:
* facebook#1257
* facebook#1363

Yarn also installs the command under `yarnpkg` alias (added in
yarnpkg/yarn@cefa9a3)
so we can use `yarnpkg` instead of `yarn` to make it more reliable.

This has no effect on users who don't have Hadoop installed, but those
who have won't see errors from falsely detecting Hadoop Yarn as Yarn
the package manager, and they can now also install Yarn to make use of
our Yarn support without the Hadoop Yarn interfering.

* Use yarnpkg alias to run Yarn (facebook#1365)

There’s a common tool included in Hadoop that also has a `yarn` command,
which created issues for users who had Hadoop installed:
* facebook#1257
* facebook#1363

Yarn also installs the command under `yarnpkg` alias (added in
yarnpkg/yarn@cefa9a3)
so we can use `yarnpkg` instead of `yarn` to make it more reliable.

This has no effect on users who don't have Hadoop installed, but those
who have won't see errors from falsely detecting Hadoop Yarn as Yarn
the package manager, and they can now also install Yarn to make use of
our Yarn support without the Hadoop Yarn interfering.

* Update changelog for 0.8.5

* Publish

 - create-react-app@1.0.3
 - react-scripts@0.8.5

* Add missing import in react-dev-utils README.md (facebook#1369)

* Change console.log for errors and warnings (facebook#1375)

Array.forEach is passed the following parameters:

currentValue
    The current element being processed in the array.
index
    The index of the current element being processed in the array.
array
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach

console.log takes multiple arguments. We only want to print the first one, the actually message.

* webpack-dev-server patch for 'still-ok' success status (facebook#1377)

* Document Flow support (facebook#1384)

* Document Flow support

Projects created by Create React App use the `babel-preset-react` which includes
Flow babel plugins which introduces new syntax. This is important for users to know
as it causes what used to be syntax errors to be silently suppressed because they're
valid type annotations in Flow. For example if a user accidentally has `[foo: 'bar']`,
Babel will silently convert it to `[foo]`.

* Make it a bit clearer

* Use a more sophisticated template for end-to-end testing. (facebook#1187)

* Use a more sophisticated template for end-to-end testing.

* Not publish integration tests to npm

* Use "commander" for  cli argv handling

* Handle different scripts version forms and exits without a name given

* Prepare the commands for testing with a template

* Fix dev "template" path

* Add various features to test

* Test various features separately

* Test language features

* Comment unused e2e.sh lines

* Add "development" tests

* Test environment variables

* Test webpack plugins

* Replace kitchensink README

* Switch integration tests from jest to mocha

* Use `fs-extra`

* Use the correct folders

* Do some cleanup

* Print a better message for `--template`

* Test `npm start` with and without https

* Separate fast e2e testing from kitchensink testing

* Hide `--internal-testing-template` (former `--template`) CLI option

* replace two space syntax with <br> tag (facebook#1393)

for consistency :)

* Add causes of dev server not detecting changes (facebook#1422)

* Add causes of dev server not detecting changes

Add causes of `npm start` not detecting changes to Troubleshooting chapter of User Guide

* Reworded slightly

* Update README.md

* Added links to tutorials for integrating cra with an api backend (facebook#1437)

* Added Rails link to User Guide

* docs: unify sections for rails and node backend integration

* docs: fix faulty link and indentation

* Added babel-runtime dependency to deduplicate dependencies when using yarn (facebook#1441)

* Bump Jest version (facebook#1432)

* Readme: Removes experimental from Jest snapshot (facebook#1453)

Per final comment in facebook#372

`Snapshot rendering should actually be pretty stable / useable after React 15.4.1.
See this post for more info.`

* eject: Additionally remove `react-scripts` from dependencies (facebook#1458)

ATM if react-scripts is (erroneously) declared in `dependencies` instead of `devDependencies` or isn't declared at all, the `eject` script will fail half-way. This change makes it more robust, react-scripts will be removed from either, if present.

* E2e jsdom fix (facebook#1470)

* E2E: run tests when react is ready

* Entangle e2e with callbacks

* Remove unused e2e lines

* - import expect and expect flow (facebook#1463)

- code style

* Reflect websocket proxy support on README (facebook#1013) (facebook#1483)

* Reflect websocket proxy support on README

* Add 'the'

* Edit User Guide: Add ESLint config for VS Code users (facebook#1482)

* Add ESLint config for VS Code users

* Update VSC ESLint note to a better solution 

Update VSC ESLint note to a better solution as discussed in Pull Request

* e2e: Reduce complexity of e2e and improve Jest coverage (facebook#1484)

* UX: Explain why build is failing (facebook#1352)

* Update comments for webpack loaders

* Change "OS X" references to "macOS" (facebook#1511)

Updated README.md to refer to the current rebranding.

* corrected minor typo (facebook#1514)

* clarifying the use of custom environment variables (facebook#1513)

* clarifying the use of custom environment variables

* Tweak

* Add missing '\n' to the end of `package.json` file (facebook#1510)

* Make all react app vars accessible in index.html (facebook#1440)

* Make all vars accessiable in index.html

* Fix wrong env provieded to DefinePlugin

* Separate results from getClientEnvironment

* The `string` should be object instead of string

* Fix accessing wrong field

* Changed variables naming to `raw` and `stringified`

* Remove trailing commas

* Add `PUBLIC_URL` env variable for advanced use (facebook#937) (facebook#1504)

* Add `PUBLIC_URL` env variable for advanced use (facebook#937)
* Add support for `PUBLIC_URL` env variable
* Remove unnecessary duplications
* Simplify served path choice logic
* Honor PUBLIC_URL in development
* Add e2e tests

Enables serving static assets from specified host.

* Support relative asset paths for special case (facebook#1489)

* Fix paths in CSS files when homepage is set to "./"

In the production build, ExtractTextPlugin is used to generate a separate CSS file instead of injecting style through JavaScript. This plugin does not work well by default with nested output structure. To fix it, we give it a relative publicPath pointing to the build folder.

* Add section in README to explain how to make builds deployable anywhere

* Apply review requested change

* Apply review changes 2

* readme: Add Advanced Configuration (facebook#1515)

* Add Advanced Configuration section

* Reference package.json instead

* Add HOST, HTTPS, and CI

* Switch wording from Amazon to a CDN

* Add test runner comment

* Add top-level README link

* Simplify wording

* Link to relevant docs

* Link to apps

* Add .env link

* Simpler links

* Add a CI flag note

* Make build exit with error code when interrupted (facebook#1496)

* Make build exit with error code when interrupted

This addresses issue facebook#1493.

Current behavior is that `npm run build` exits code 0 without creating a bundle when interrupted. This change makes the build script catch catchable interruptions and exit with the appropriate error code.

* Better error messages for kill signals

* Don't catch SIGINT

Ctrl+C should exit silently, and already produces a non-zero exit code when sent to the console while `npm run build` is running. Exit code 0 is produced if SIGINT is sent directly to the `node build.js` process, but this is unlikely to happen. A SIGINT handler in `build.js` will also be triggered by Ctrl+C in the console, potentially producing unnecessary noise.

* Style fix

* No changes needed to build.js

Problem is coming from the parent process, `react-scripts`

* Make react-scripts script handle signals

* Clarify context

* Bump lerna

* Add test cases for PUBLIC_URL and relative path (facebook#1519)

* Add test cases to evaluate increased CI time

* Add positive test cases

* Add negative cases

* Test default behavior

* Exit on failure

* Fix test

* Add an annoying nit

* Upgrade babel dependencies

* Don't run CI on Node 0.10 (facebook#1521)

* fix: add yarn gitignores (facebook#1507)

* fix: add yarn gitignores to template

* fix: add yarn gitignores to root

* fix: add wildcard to npm-debug.log ignore

* Upgrade dependencies (facebook#1522)

* Upgrade dependencies

* Re-add caret

* Add CHANGELOG

* Publish

 - babel-preset-react-app@2.1.0
 - create-react-app@1.0.4
 - eslint-config-react-app@0.5.1
 - react-dev-utils@0.5.0
 - react-scripts@0.9.0

* Make index.html interpolation instructions less clashing with env syntax

* Add additional info about env variables

* Massage 0.9.0 changelog

* Add release cutters to changelog

* Tweak indentation

* Markdown whitespace fixes

* Some changelog formatting

* Suggest jest-enzyme for simplifying test matchers (facebook#994)

* Suggest jest-enzyme for simplifying test matchers

* Update README.md

* Update README.md

* Fix `test -e` with wildcard arguments. (facebook#1503)

The `test` command fails with multiple arguments when given a unary operator such as '-e'. Add a function that can test one or more files by looping over all files.

* Link to new Sass doc

* Clarify Less/Sass support

* Add a link to supported features

* Add SASS support documentation facebook#1007 (facebook#1008)

* Add SASS support documentation facebook#1007

* Change SASS section title to more generic label

* Fix link in Table of Contents

* Chain build-css with watch-css script, fix typos

* Update Sass and Less naming style

* Fix wording, remove offensive words

* Slightly rewite

* [documentation] how to disable autoprefix feature (facebook#1320)

* added how to disable autoprefix feature in doc

* Just link to the doc

* Added link to Azure deployment tutorial (facebook#1338)

* Correctly Command in README.md (facebook#1275)

* change npm to yarn command

* Keep npm primary option

* reduxjs/redux#2004 List features beyond ES6 supported by create-react-app (facebook#1313)

* reduxjs/redux#2004 List features beyond ES6 supported by create-react-app

* Add more info

* Update language support wording to ES2017

* Tweak syntax doc (facebook#1539)

* Tweak syntax doc

* Shorter version

* Add useful link to react-scripts (facebook#1495)

* Make node version check more robust in e2e.sh (facebook#1295)

* Revert "Don't run CI on Node 0.10" (facebook#1547)

* Revert "Don't run CI on Node 0.10"

* Install after checking node version

* Don't use travis install

* update CSS preprocessor instructions (facebook#1543)

* update CSS preprocessor instructions
- Windows shell users should note that running two programs simultaneously is not supported.

* fix the order of SASS build step
- the suggested build step with integrated CSS preprocessing is wrong. The SASS preprocessor should run first, then the react-scripts build will pick the up-to-date final CSS

* Add tweaks from PR discussion

* Use Yarn latest in e2e (facebook#1534)

* Use Yarn latest in e2e

* Here too

* And here plz

* modified documentation for setting up jest-enzyme (facebook#1562)

* Use https in link to Ignoring files at Github (facebook#1561)

* add --recursive to sass watch script (facebook#1564)

* Mention Windows support explicitly

* Reorder

* MacOS => macOS

* Update README.md (facebook#1573)

Update links to jest expect function.

* Switch from Neo to Neutrino (facebook#1576)

* Switch from Neo to Neutrino

* Edited format to be consistent

* fixes facebook#1584 PORT env variable not always an integer (facebook#1585)

* babel-preset: remove babel-plugin-transform-es2015-parameters (facebook#1598)

babel/babel#4851 is closed

* Add note for using CHOKIDAR_USEPOLLING in virtual machines to enable HMR (facebook#1608)

* Add note for using CHOKIDAR_USEPOLLING in virtual machines to enable HMR

* Use br in react-scripts template README md

* Use br in md for new line breaks

* Update troubleshooting HMR to allow for VMs running Windows

* Fix up the instructions

* Allow --scripts-version to be a git url (facebook#1570)

* Install react, react-dom, and react-scripts at the same time (facebook#1253)

* Install react and react-dom along with react-scripts

- Install react, react-dom and react-script in a same time
- Move react-scripts to devDependencies.

* Check if react, react-dom has been already installed

- To backward compatibility with old CRA’s cli
- In case old CRA doesn’t install react, react-don along with
react-scripts

* Use packageName to find script dependency

- use packageName to find dependency
- fix pathExists.sync

* Check dependencies.react in package.json instead of actual files

* Process exit when dependencies not found

- Show error and exit when dependencies not found.
- Log install show custom package name

* Remove template string

* Install dependencies if template is preseted

* Remove dangling comma

Resolves facebook#1239

* add a comment about NODE_ENV value set to 'production' during build step (facebook#1625)

* add a comment about NODE_ENV value set to 'production' during build step

facebook#790 (comment)

* Move words around

* Update flow configuration documentation (facebook#1518)

* Update flow configuration documentation

The documentation was missing creating the .flowconfig file

* Update flow configuration documentation

Adding in suggested changes

* Wording

* Wording

* Add note about when to import bootstrap CSS. (facebook#1618)

* Add note about when to import bootstrap CSS.

* Tweak

* Document Sass imports

* Fix workflow if react-scripts package is linked via npm-link (facebook#1356)

* add npm-link support

* - remove extra veriable
- simplify condition

* update code after review:
- remove utils/isReactScriptsLinked
- add appPath and ownPath to paths.js (but only for "before eject" export case)

* update code after review:
- remove utils/isReactScriptsLinked
- add appPath and ownPath to paths.js (but only for "before eject" export case)

* update code after review:
- remove utils/isReactScriptsLinked
- add appPath and ownPath to paths.js (but only for "before eject" export case)
- remove "if" block for fs.removeSync(ownPath) at ejec.tjs

* change ownPath value

* Document debugging in the browser. (facebook#1540)

* Document debugging in the browser.

* Styling

* Link to "Debugging in the Editor"

* Adding link to “Customizing” create-react-app (facebook#1121)

Add documentation for customizing Bootstrap theme

* Update index.js (facebook#1603)

To avoid file conflict issue with IJ static web projects

* Remove .bin files defined at react-scripts/package.json after eject  (facebook#1567)

* remove bin files after eject defined at package.json

* add swallowing try/catch

* Bump `recursive-readdir`. (facebook#1560)

* Added a how-to on react-snapshot (facebook#1577)

* Added a how-to on react-snapshot

Added a section with a short description and link to a tutorial on generating static html pages with react-snapshot, and also linked to it from the section on managing the page title.

* Updated link title for react-snapshot overview

* Explained pre-rendering in a more generic way

* Added link to top level README.md, and removed specifics from overview

* Updated html -> HTML

* Updated quotes and apostrophes

* html -> HTML

* Fix link

* NPM version check for tip (facebook#1193)

* Implemented a version check of npm to give a soft tip during the install procedure
and fixed gitignore

* Moved NPM check to method, it is only executed when you use NPM and the version is < 3.

* Minor formatting tweaks

* Simplify the code

* Remove unnecessary change

* Enable eslint caching in development (facebook#1578)

* Enable eslint caching in development

POC for facebook#740. Haven't found any problem, build times improved about 1s on my project and machine.

* Bump eslint-loader to 1.6.3

* move @remove-on-eject block to persist cache config on eject

* Use real build path name in build output (facebook#1478)

Use the configured appBuild value in paths.js instead of hard-coding it to 'build'.  This is helpful for the ejected case where the appBuild path is changed to another folder name.

* adding a note on how to resolve "Could not find a required file." dep… (facebook#1391)

* adding a note on how to resolve "Could not find a required file." deployment errors because of deleted or ignored files

* Tweak

* Unrelated style nits

* Use posix paths for Jest config during eject (facebook#1635)

Resolves facebook#1417 and facebook#1498.

* Setting a dynamic port value for the pushstate-server URL text (facebook#1628)

* Setting a dynamic port value for the pushstate-server URL text after a build is completed

* Fixing merge conflict

* Fix up broken line

* Gracefully handle initial installation error (facebook#1512)

* Gracefully handle initial installation error

* Print out message when problem occurs
* Delete project folder on errors

* Fix directory deleting message

Resolves facebook#1505

* Add changelog for 0.9.1

* Publish

 - babel-preset-react-app@2.1.1
 - create-react-app@1.1.0
 - eslint-config-react-app@0.5.2
 - react-dev-utils@0.5.1
 - react-scripts@0.9.1

* Update changelog

* Fix npm test on Windows (facebook#1647)

* Add 0.9.2 changelog

* 0.9.2

* Add a note about known issue

* Merge changelogs

* Format differently

* Set Chrome userDataDir to be under .vscode folder (facebook#1657)

* Fix e2e when used with cold cache (facebook#1667)

Resolves facebook#1666

* Fix e2e-simple (cont.)

* Add appveyor.yml (facebook#1648)

* Add appveyor.yml

* Execute mocha directly in e2e test

* Replace e2e process substitution

* Kill nohup node processes after e2e

* Disable known failing Windows test

* Only build master

* fix react dependency versions during initial install (facebook#1669)

* fix react dependency versions during initial install

* add review remarks

* Remove Windows 0.10 simple test

* add project name validation (facebook#1662)

* add project name validation

* Tweak console output

* fix project cleanup on windows (facebook#1675)

* Revert "Enable eslint caching in development" (facebook#1665)

* add X-FORWARDED headers for proxy requests (facebook#1677)

* Use offline cached version with yarn when it's possible (facebook#1423)

* add --offline flag when we are using yarn and we are offline

* Revert changes to init script

We only run these commands for backward compat mode, in which we wouldn't receive the offline flag anyway

* Don't pass isOnline to init script because it doesn't need it

* Don't ping the Yarn registry if user doesn't have Yarn

* Remove unused/wrong arguments

* Move logs to error handler

* Fix error handling

* Report to the user that they're offline

* Add 0.9.3 changelog (facebook#1683)

* Add "migrating" section for 0.9.3

* Publish

 - create-react-app@1.2.0
 - react-scripts@0.9.3

* False expression should not be in dependencies

* Publish

 - create-react-app@1.2.1

* appveyor: Build all branches

* Suggest CRA 1.2.1 in changelog

* Fixed missing flag in first preprocess command (facebook#1687)

* Re-enable e2e-install directory test

* Suggest to use .env for enabling polling mode (facebook#1698)

* Diagnostic code (facebook#1695)

* Adding diagnostic code as requested by @gaearon

* Oops

* Fix Jest tests for Cygwin

* Improve reliability of port hint. (facebook#1696)

* fixing things for people with the username `cwd`

closes facebook#1694

* combine awk into a single command and add escaping

* pin and bump lerna (facebook#1688)

* Lerna 2.0.0-beta.38 expects packages entry

* Add docs for apache's client side routing setting (facebook#1717)

* Add docs for apache's client side routing setting

* Tweak advice

* Update now.sh deployment instructions. (facebook#1710)

* Update now.sh deployment instructions.

Incorporates changes announced at https://zeit.co/blog/now-static that streamline Now deployments from CRA projects.

* Remove unintentional reference to deployed app.

No emergency; just didn't intend to tout or send traffic to my prototype.

* Add support for ignoreRestSiblings in no-unused-vars (facebook#1705)

* updating eslint to 3.16.1

* add support for ignoreRestSiblings in eslint

http://eslint.org/docs/rules/no-unused-vars#ignorerestsiblings

* updating eslint to 3.16.1 in `react-scripts`

* updating eslint

* missing `^`

* missing ^

* pinning main eslint and updating readme

* Pin ESLint version

* add double quotes to escape spaces in paths in e2e (facebook#1707)

* add double quotes to escape spaces in path

* Change $* to "$@" props to @n3tr

* escape spaces in path for all e2e tests

* Create appveyor.cleanup-cache.txt

* Link Appveyor caches to appveyor.cleanup-cache.txt

* Trigger AppVeyor cache cleanup

* Fix hot reloading for WebpackDevServer after eject (facebook#1721)

* Fix openBrowser() when BROWSER=open on macOS (facebook#1690)

* Fix openBrowser() when BROWSER=open on macOS

* Tweaks

* Create empty package.json in e2e test (facebook#1401) (facebook#1402)

* Create empty package.json in e2e test

Create empty package.json in e2e test while installing packaged CLI to prevent installation issues.

* Use "npm init" to initialize package.json instead of just writing an empty object into it.

* Fix typo

* Skip AppVeyor CI builds for Markdown changes (facebook#1723)

* Skip CI builds for Markdown changes

* I will never learn YML

* Don't use ES6 in a file that should run on Node 4 (facebook#1724)

* Bump jsx-a11y version (facebook#1542)

* Bump jsx-a11y version

* Update package dependecy for jsx-a11y

* Bump version in react-scripts

* Bump ESLint config to 0.6.0 manually

* Fix Node 4 e2e tests (facebook#1730)

* Lint internal scripts with eslint:recommended (facebook#1729)

* Lint internal scripts with eslint:recommended

* Warnings r bad

* Fix ejecting from a scoped fork (facebook#1727)

* Read script names from own bin instead of guessing

This fixes ejecting from a fork that uses a different bin script name.

* Fix ejecting for a scoped react-scripts fork

We shouldn't hardcode react-scripts because fork name might differ.
We also shouldn't rely on it being an immediate child because scoped packages are a level deeper.

* Clarify that own* properties only exist before ejecting

* Properly extract package name for installing tgz of scoped packages (facebook#1706)

* Properly extract package name

* Download package if need be ...

* Oops

* Add e2e test based on facebook#1537, but without specific filename

* Pass packageName through promises

A little bit more verbose but explicit and doesn't rely on shared mutable state.

* Fix up directory name in test

* Tweak failure message

* Fix lint

* extract generic build functions to react-dev-utils (facebook#1726)

* Temp rename

* Rename to change the case

* extract generic build functions to react-dev-utils

* tweak package json files and move removeFileNameHash

* revert removeFileNameHash

* use paths.appBuild in printFileSizes

* use paths.appBuild in removeFileNameHash

* change curried functions to regular functions

* add fs-extra to react-dev-utils deps

* move getDifferenceLabel inside printFileSizes

* inline copyPublicFolder

* combine printFileSizes and removeFileNameHash to fileSizeReporter

* fix typo

* Tweak APIs and fix issues

* Fix heading

* Remove missing file

* Newline

* Newline

* Trailing space

* Update FileSizeReporter.js

* Update build.js

* Bust AppVeoyr cache

* Relax ESLint config peerDependency (facebook#1740)

* Fix internal linting setup and add missing headers (facebook#1741)

* Fix lint

* Fix eject for linked react-scripts (facebook#1736)

* fix eject for linked react-scripts

* path.resolve => resolveApp

* Add changelog for 0.9.4

* Publish

 - create-react-app@1.3.0
 - eslint-config-react-app@0.6.1
 - react-dev-utils@0.5.2
 - react-scripts@0.9.4

* Adjust changelog wording

* Switch to preset-env (facebook#1742)

* Switch to preset-env
Disables webpack modules by enabling babel modules to resolve facebook#1638

* Bump babel-core to match babel preset versions

* Add uglify to targets

* Display yarn instead of yarnpkg when creating a new app (facebook#1747)

* Display yarn instead of yarnpkg

* Refactored displayd commands

* Removed testing directory

* Add yarn steps for adding flow (facebook#1756)

[skip ci]

* Suggest `serve` for running in production (facebook#1760)

* Suggest `serve` for serving the `build` directory

* How to handle it with Node in prod (or other platforms)

* Pretty newline added

* Adjusted default port of static server

* Remove `open` command from output

* Removed constant assignment

* Better explanation for not using having to use a static server

* Cute newline added

* Style nits

* Remove 'guard-for-in' lint rule (facebook#1773)

Iterating over an object's keys using `for/in` is idiomatic and it's safe (in all modern browsers) to not check hasOwnProperty as long as the object is a plain object. Can we remove this lint rule?

* Run CI on Node 7; Bump detect-port: 1.0.1 -> 1.1.0 (facebook#1776) (facebook#1783)

* Run CI on Node 7

* Bump detect-port: 1.0.1 -> 1.1.0

* Run AppVeyor CI on Node 7

* Add 0.9.5 changelog (facebook#1784)

* Add 0.9.5 changelog

* Update CHANGELOG.md

* Publish

 - babel-preset-react-app@2.2.0
 - eslint-config-react-app@0.6.2
 - react-scripts@0.9.5

* docs(babel-preset): Update comment info about babel-preset-env. (facebook#1787)

* Feature/readme-nomoretools (facebook#1799)

* docs: replace TDLR with a meaningful heading

* docs: insert section No additional build tools

* Tweak wording

* Suggest "yarn build" rather than "yarn run build" (facebook#1800)

* Fix for issue facebook#1798: Suggested 'yarn build' versus 'yarn run build'

* remove 'run' from 'yarn test' command as well

* conditionally show 'run' if Yarn is not available

* Tweak the wording

* Allow creation of apps in empty mercurial repos (facebook#1811)

* Allow creation of apps in empty mercurial repos

* Adding .hgignore to list of validFiles for isSafeToCreateProjectIn check

* Adding .hgcheck to list of validFiles for isSafeToCreateProjectIn check

* Link to CRNA

* Make Surge guide more focused

* User Guide: Removed blockquote from code section, due to markdown conflict (facebook#1869)

* Removed blockquote from code section

* Fix the fix

* Fix AppVeyor CI (facebook#1876)

* Fix responsive behavior in iOS 9+ (facebook#1821)

* Adding shrink-to-fit=no for proper responsive handling on Safari 9+

* Check internet connectivity with lookup instead of resolve (facebook#1863)

Resolves facebook#1818

* Update `detect-port` (facebook#1861)

Previous changes caused `detect-port` to pick random port on app startup. Update fixes this regression, `detect-port` pick next available port instead.

* Fix importing linked packages (facebook#1884)

Resolves facebook#1661

* Fix AppVeyor CI (facebook#1868)

* Fix AppVeyor CI (facebook#1876)

* Run AppVeyor on Visual Studio 2017

* Suggest Yarn in HTML template (facebook#1911)

* Fix npm to yarn

* yarn & npm

* Update index.html

* Switch ordering of suggestion

We should suggest NPM first for new users.

* Note that only jest-enzyme@2.x is compatible

* Add sku to the list of alternatives (facebook#1962)

* Update information in User Guide for Enzyme dependency (facebook#1982)

* Ensure proxy url starts with `http://` or `https://` (facebook#1890)

* Update ansi-html to fix facebook#1881

* Add linked modules test (0.9.x) (facebook#1912)

* Add linked modules test

* Keep fallback after eject

* Add note about installing watchman (facebook#1950)

* Add note about installing watchman

* Update CONTRIBUTING.md

* Start the dev server at the specified host

Pass the host from environment variable as argument of the devServer's
listen function instead of a field of options object.
Set the default host to 0.0.0.0 instead of localhost.

* Add folder structure docs for new contributors (facebook#1991)

* Adding folder structure to help people navigate through project. It helps in resolving issues by providing brief description of each package and its purpose

* Removing unnecessary packages from Folder structure heading

* Update CONTRIBUTING.md

* Relax label rules (facebook#1989)


# Conflicts:
#	packages/eslint-config-react-app/index.js

* Update doc server example to work from any directory (facebook#1988)

* Node.js serving with absolute path

It’s safer to use the absolute path of the directory that you want to serve, in case you run the express app from another directory.

* Update README.md

* Fix config discrepancies after merging from upstream v0.9.x

* Minor fixes per feedback for upstream merging

* Fix import from incorrect module

* Release v7.0.0
  • Loading branch information
iamlacroix authored May 16, 2017
1 parent 8c7434c commit 7a11edd
Show file tree
Hide file tree
Showing 132 changed files with 4,715 additions and 704 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
build
my-app*
packages/react-scripts/template
packages/react-scripts/fixtures
15 changes: 14 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
{
"extends": "react-app"
"extends": "eslint:recommended",
"env": {
"browser": true,
"commonjs": true,
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 6
},
"rules": {
"no-console": "off",
"strict": ["error", "global"]
}
}
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
.idea/
.vscode/
node_modules/
build
.DS_Store
*.tgz
my-app*
template/src/__tests__/__snapshots__/
lerna-debug.log
npm-debug.log
packages/react-scripts/template/artifacts/coverage/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/.changelog
22 changes: 18 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
---
language: node_js
node_js:
- 0.10
- 4
- 6
- 7
cache:
directories:
- node_modules
- packages/create-react-app/node_modules
- packages/react-scripts/node_modules
script: tasks/e2e.sh
install: true
script:
- 'if [ $TEST_SUITE = "simple" ]; then tasks/e2e-simple.sh; fi'
- 'if [ $TEST_SUITE = "installs" ]; then tasks/e2e-installs.sh; fi'
- 'if [ $TEST_SUITE = "kitchensink" ]; then tasks/e2e-kitchensink.sh; fi'
env:
- USE_YARN=no
- USE_YARN=yes
global:
- USE_YARN=no
matrix:
- TEST_SUITE=simple
- TEST_SUITE=installs
- TEST_SUITE=kitchensink
matrix:
include:
- node_js: 0.10
env: TEST_SUITE=simple
- node_js: 6
env: USE_YARN=yes TEST_SUITE=simple
585 changes: 559 additions & 26 deletions CHANGELOG.md

Large diffs are not rendered by default.

35 changes: 34 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Following these guidelines helps to communicate that you respect the time of the

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.

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

### Convention
Expand Down Expand Up @@ -41,12 +41,44 @@ Please **ask first** if somebody else is already working on this or the core dev

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

## Folder Structure of Create React App
`create-react-app` is a monorepo, meaning it is divided into independent sub-packages.<br>
These packages can be found in the [`packages/`](https://github.com/facebookincubator/create-react-app/tree/master/packages) directory.

### Overview of directory structure
```
packages/
babel-preset-react-app/
create-react-app/
eslint-config-react-app/
react-dev-utils/
react-scripts/
```
### Package Descriptions
#### [babel-preset-react-app](https://github.com/facebookincubator/create-react-app/tree/master/packages/babel-preset-react-app)
This package is a babel preset intended to be used with `react-scripts`.<br>
It targets platforms that React is designed to support (IE 9+) and enables experimental features used heavily at Facebook.<br>
This package is enabled by default for all `create-react-app` scaffolded applications.
#### [create-react-app](https://github.com/facebookincubator/create-react-app/tree/master/packages/create-react-app)
The global CLI command code can be found in this directory, and shouldn't often be changed. It should run on Node 0.10+.
#### [eslint-config-react-app](https://github.com/facebookincubator/create-react-app/tree/master/packages/eslint-config-react-app)
This package contains a conservative set of rules focused on making errors apparent and enforces no style rules.<br>
This package is enabled by default for all `create-react-app` scaffolded applications.
#### [react-dev-utils](https://github.com/facebookincubator/create-react-app/tree/master/packages/react-dev-utils)
This package contains utilities used for `react-scripts` and sister packages.<br>
Its main purpose is to conceal code which the user shouldn't be burdened with upon ejecting.
#### [react-scripts](https://github.com/facebookincubator/create-react-app/tree/master/packages/react-scripts)
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>
All functionality must be retained (and configuration given to the user) if they choose to eject.

## Setting Up a Local Copy

1. Clone the repo with `git clone https://github.com/facebookincubator/create-react-app`

2. Run `npm install` in the root `create-react-app` folder.

3. *(Only for macOS Sierra)*: Until [0.10.0](https://github.com/facebookincubator/create-react-app/milestone/23) is released, you may need to install [Watchman](https://facebook.github.io/watchman/docs/install.html) (e.g. `brew install watchman`).

Once it is done, you can modify any file locally and run `npm start`, `npm test` or `npm run build` just like in a generated project.

If you want to try out the end-to-end flow with the global CLI, you can do this too:
Expand All @@ -68,6 +100,7 @@ and then run `npm start` or `npm run build`.
* You'll need an [access token for the GitHub API](https://help.github.com/articles/creating-an-access-token-for-command-line-use/). Save it to this environment variable: `export GITHUB_AUTH="..."`
* Run `npm run changelog`. The command will find all the labeled pull requests merged since the last release and group them by the label and affected packages, and create a change log entry with all the changes and links to PRs and their authors. Copy and paste it to `CHANGELOG.md`.
* Add a four-space indented paragraph after each non-trivial list item, explaining what changed and why. For each breaking change also write who it affects and instructions for migrating existing code.
* Maybe add some newlines here and there. Preview the result on GitHub to get a feel for it. Changelog generator output is a bit too terse for my taste, so try to make it visually pleasing and well grouped.
6. Make sure to include “Migrating from ...” instructions for the previous release. Often you can copy and paste them.
7. After merging the changelog update, create a GitHub Release with the same text. See previous Releases for inspiration.
8. **Do not run `npm publish`. Instead, run `npm run publish`.**
Expand Down
44 changes: 32 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,31 @@ Create React apps with no build configuration.
* [Getting Started](#getting-started) – How to create a new app.
* [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.

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

## Quick Overview

```sh
npm install -g create-react-app

create-react-app my-app --scripts-version @trunkclub/build
cd my-app/
npm start

```

Then open [http://localhost:3000/](http://localhost:3000/) to see your app.<br>
When you’re ready to deploy to production, create a minified bundle with `npm run build`.

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

### Get Started Immediately

You **don’t** need to install or configure tools like Webpack or Babel.<br>
They are preconfigured and hidden so that you can focus on the code.

Just create a project, and you’re good to go.

## Getting Started

### Installation
Expand All @@ -35,7 +44,7 @@ npm install -g create-react-app

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

**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.
**This tool doesn’t assume a Node backend**. The Node installation is only required for Create React App itself.

### Creating an App

Expand Down Expand Up @@ -70,7 +79,7 @@ my-app/
No configuration or complicated folder structures, just the files you need to build your app.<br>
Once the installation is done, you can run some commands inside the project folder:

### `npm start`
### `npm start` or `yarn start`

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

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

### `npm test`
### `npm test` or `yarn test`

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

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

### `npm run build`
### `npm run build` or `yarn build`

Builds the app for production to the `build` folder.<br>
It correctly bundles React in production mode and optimizes the build for the best performance.
Expand All @@ -102,28 +111,33 @@ The [User Guide](https://github.com/facebookincubator/create-react-app/blob/mast
- [Updating to New Releases](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#updating-to-new-releases)
- [Folder Structure](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#folder-structure)
- [Available Scripts](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#available-scripts)
- [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)
- [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)
- [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)
- [Debugging in the Editor](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#debugging-in-the-editor)
- [Changing the Page `<title>`](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#changing-the-page-title)
- [Installing a Dependency](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#installing-a-dependency)
- [Importing a Component](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#importing-a-component)
- [Adding a Stylesheet](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-stylesheet)
- [Post-Processing CSS](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#post-processing-css)
- [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)
- [Adding Images and Fonts](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-images-and-fonts)
- [Using the `public` Folder](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder)
- [Using Global Variables](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-global-variables)
- [Adding Bootstrap](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-bootstrap)
- [Adding Flow](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-flow)
- [Adding Custom Environment Variables](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-custom-environment-variables)
- [Can I Use Decorators?](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#can-i-use-decorators)
- [Integrating with a Node Backend](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#integrating-with-a-node-backend)
- [Integrating with an API Backend](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#integrating-with-an-api-backend)
- [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)
- [Using HTTPS in Development](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-https-in-development)
- [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)
- [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)
- [Running Tests](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests)
- [Developing Components in Isolation](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#developing-components-in-isolation)
- [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)
- [Deployment](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#deployment)
- [Advanced Configuration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration)
- [Troubleshooting](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#troubleshooting)

A copy of the user guide will be created as `README.md` in your project folder.
Expand All @@ -144,7 +158,7 @@ Please refer to the [User Guide](https://github.com/facebookincubator/create-rea

**If you’re getting started** with React, use `create-react-app` to automate the build of your app. There is no configuration file, and `react-scripts` is the only extra build dependency in your `package.json`. Your environment will have everything you need to build a modern React app:

* React, JSX, and ES6 support.
* React, JSX, ES6, and Flow syntax support.
* Language extras beyond ES6 like the object spread operator.
* A dev server that lints for common errors.
* Import CSS and image files directly from JavaScript.
Expand Down Expand Up @@ -172,7 +186,7 @@ Some features are currently **not supported**:
* Server rendering.
* Some experimental syntax extensions (e.g. decorators).
* CSS Modules.
* LESS or Sass.
* 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)).
* Hot reloading of components.

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.
Expand All @@ -195,6 +209,11 @@ All of them are transitive dependencies of the provided npm package.

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.

## React Native

Looking for something similar, but for React Native?<br>
Check out [Create React Native App](https://github.com/react-community/create-react-native-app/).

## Acknowledgements

We are grateful to the authors of existing related projects for their ideas and collaboration:
Expand All @@ -205,11 +224,11 @@ We are grateful to the authors of existing related projects for their ideas and

## Alternatives

If you don’t agree with the choices made in this project, you might want to explore alternatives with different tradeoffs.
If you don’t agree with the choices made in this project, you might want to explore alternatives with different tradeoffs.<br>
Some of the more popular and actively maintained ones are:

* [insin/nwb](https://github.com/insin/nwb)
* [mozilla/neo](https://github.com/mozilla/neo)
* [mozilla-neutrino/neutrino-dev](https://github.com/mozilla-neutrino/neutrino-dev)
* [NYTimes/kyt](https://github.com/NYTimes/kyt)
* [zeit/next.js](https://github.com/zeit/next.js)
* [gatsbyjs/gatsby](https://github.com/gatsbyjs/gatsby)
Expand All @@ -225,6 +244,7 @@ Notable alternatives also include:
* [react-app](https://github.com/kriasoft/react-app)
* [dev-toolkit](https://github.com/stoikerty/dev-toolkit)
* [tarec](https://github.com/geowarin/tarec)
* [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.<br>
React documentation includes [a walkthrough](https://facebook.github.io/react/docs/package-management.html) on this topic.
5 changes: 5 additions & 0 deletions appveyor.cleanup-cache.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Edit this file to trigger a cache rebuild.
http://help.appveyor.com/discussions/questions/1310-delete-cache

----
Just testing if this works.
50 changes: 50 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
image: Visual Studio 2017

environment:
matrix:
- nodejs_version: 7
test_suite: "simple"
- nodejs_version: 7
test_suite: "installs"
- nodejs_version: 7
test_suite: "kitchensink"
- nodejs_version: 6
test_suite: "simple"
- nodejs_version: 6
test_suite: "installs"
- nodejs_version: 6
test_suite: "kitchensink"
- nodejs_version: 4
test_suite: "simple"
- nodejs_version: 4
test_suite: "installs"
- nodejs_version: 4
test_suite: "kitchensink"

cache:
- node_modules -> appveyor.cleanup-cache.txt
- packages\react-scripts\node_modules -> appveyor.cleanup-cache.txt

clone_depth: 50

matrix:
fast_finish: true

platform:
- x64

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

build: off

skip_commits:
files:
- '**/*.md'

test_script:
- node --version
- npm --version
- sh tasks/e2e-%test_suite%.sh
7 changes: 5 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lerna": "2.0.0-beta.30",
"lerna": "2.0.0-beta.38",
"version": "independent",
"changelog": {
"repo": "facebookincubator/create-react-app",
Expand All @@ -12,5 +12,8 @@
"tag: internal": ":house: Internal"
},
"cacheDir": ".changelog"
}
},
"packages": [
"packages/*"
]
}
Loading

0 comments on commit 7a11edd

Please sign in to comment.