Commit Graph

35 Commits

Author SHA1 Message Date
Dan Abramov
7cf4de71fa Warn about large bundle sizes (#2648) 2017-06-28 00:00:49 +01:00
Joe Haddad
31a4d14b33 Fix a potential issue (#2569) 2017-06-19 13:27:02 -04:00
varnav
5b38c5439d Check if CI variable is set to 'false' (#2501)
* Fix incorrect check if CI variable is set to true

Originally build would fail on warnings with any value of CI environment variable. Now it will correctly check if it's true.

Discussed here: https://github.com/facebookincubator/create-react-app/issues/2453

* Check for "not false" instead of "not true"

After discussion we decided that this will be closer to current functionality and not break anything.
2017-06-19 12:36:28 -04:00
Dan Abramov
2069e8ac43 Consistently set environment variables (#2382) 2017-05-27 12:37:07 +01:00
Jin Zheng
b60f55c6bf Print file sizes with correct build folder path. (#2361)
* Print file sizes with correct build folder path.

* Just use the print the basename.
2017-05-25 16:18:29 +01:00
Dan Abramov
43b819c2bb "rule keywords" => "keywords" 2017-05-18 22:46:30 +01:00
Dan Abramov
8dc9217b61 Move more logic from react-scripts to react-dev-utils (#2209)
* Show warnings for builds

* Move WebpackDevServer helpers into react-dev-utils
2017-05-18 12:26:18 +01:00
Dan Abramov
c82c4f0561 Refactor and improve build output (#2202) 2017-05-18 01:24:42 +01:00
Valerii Sorokobatko
80a7fc391d Feature/different env config files #1343 (#1344)
* support different env configs.

* fomrat code

* Hide doc

* Slightly rework the PR

* Remove .env in default template
* Use just one entry in the paths
* Unify env.js and loadEnv.js

* Oops, forgot these folks
2017-05-12 11:30:59 +01:00
David
0ace417c45 Make scripts crash on unhandled rejections (#1819)
* Makes end-to-end testing crash on unhandled rejections

* Comment fix
2017-03-14 15:32:48 -04:00
Leo Lamprecht
8c00af1440 Suggest serve for running in production (#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
2017-03-08 22:34:31 +00:00
Valerii Sorokobatko
fe7b5c212b update to modern code style (#1738)
* mv create-react-app/index.js -> create-react-app/creteReactApp.js

* update to modern code style

* var -> cosnt

* set trailing-coma to es5 for prettier
2017-03-07 19:46:10 +00:00
Dan Abramov
1bfd5dafdf Fix internal linting setup and add missing headers (#1741) 2017-03-06 14:20:29 +00:00
Ade Viankakrisna Fadlil
fbdff9d722 extract generic build functions to react-dev-utils (#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
2017-03-06 01:49:53 +00:00
Dan Abramov
3289c32021 Fix up broken line 2017-02-24 22:29:36 +00:00
Matt Crampton
dbf17fd0e4 Setting a dynamic port value for the pushstate-server URL text (#1628)
* Setting a dynamic port value for the pushstate-server URL text after a build is completed

* Fixing merge conflict
2017-02-24 22:28:36 +00:00
chyipin
925ab7268f Use real build path name in build output (#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.
2017-02-24 20:32:15 +00:00
Johann Hubert Sonntagbauer
0ef9e80349 (feat): add webpack validation error logging (#1596)
* (feat): add webpack validation error logging

* Style nit

* Style tweak

* Style nit
2017-02-24 17:28:54 +00:00
Joe Haddad
613b584f42 Add PUBLIC_URL env variable for advanced use (#937) (#1504)
* Add `PUBLIC_URL` env variable for advanced use (#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.
2017-02-09 23:15:15 -05:00
Jay Phelps
9e0e18fd2e UX: Explain why build is failing (#1352) 2017-02-08 15:27:44 -05:00
Paul O’Shannessy
4d7b7544e7 Use npm script hooks to avoid && in deploy script (#1324) 2016-12-30 17:59:27 +02:00
Eduard Kyvenko
21b0044412 Remove path-exists from dependencies and replace it with fs.existsSync (#1289) 2016-12-18 20:57:00 +02:00
Jirat Ki
39a5b4de6e Skip gh-page setup instruction if scripts.deploy has been added (#1222) 2016-12-09 12:42:52 -08:00
Dirk-Jan Rutten
cdd17a6914 Crash the build during CI whenever linter warnings are encountered (#944)
* Added functionality to crash the build during CI whenever linter warnings are encountered.

* Updated the docs with a description on how to use the build in CI

* Fixed small typo

* Fixed description of build error.
2016-12-03 14:39:29 +02:00
Brian Ng
2da6edabab Replace rimraf with fs-extra functions (#1072) 2016-11-21 18:26:08 +00:00
Dan Abramov
ff7e22e5a8 Update GH deploy instructions to match User Guide 2016-11-20 18:13:09 +00:00
Nazim Hajidin
1668fb1948 Add missing --dev argument (#1058) 2016-11-20 15:30:12 +02:00
Ville Immonen
bcc469c9a5 Support Yarn (#898)
In the `create-react-app` command, try to install packages using Yarn.
If Yarn is not installed, use npm instead.

In `react-scripts`, detect if the project is using Yarn by checking if
a `yarn.lock` file exists. If the project is using Yarn, display all
the instructions with Yarn commands and use Yarn to install packages
in `init` and `eject` scripts.
2016-11-17 22:55:00 +02:00
Patrick Dillon
c6428eaff9 Exit production build if any errors are in build stats (#859)
* Exit on any errors passed in build stats

* Match console error output in start.js
2016-10-07 15:12:53 +01:00
Jan Potoms
feb6036fb2 Update instructions on publishing to GitHub pages (#841)
* Update instructions on publishing to GitHub pages

* Update README formatting
2016-10-04 15:34:41 +03:00
Brian Ng
909d938166 Fix some typos (#809) 2016-10-01 12:13:42 +03:00
Dan Abramov
e5bf5af296 Extract some utilities into a separate package (#723)
* Extract some utilities into a separate package

* Add utils dir to `files` in package.json

* Do not create an empty `utils` dir on eject
2016-09-23 20:53:08 +01:00
Ayrton De Craene
8e5183ac1b Load environment file in development (#695)
* Load environment file via dotenv if .env file is present

* Document loading environment variables in .env file

* Minor doc tweaks
2016-09-23 11:59:38 +01:00
Dan Abramov
bc6392afaf Add support for public/ folder (#703) 2016-09-22 21:25:34 +01:00
Ville Immonen
26464096d5 Set up a monorepo with Lerna 2016-09-19 10:52:19 +03:00