Commit Graph

44 Commits

Author SHA1 Message Date
Dan Abramov
a171d93064 Reformat source code with Prettier 1.5.2 2017-06-28 16:23:16 +01:00
Dan Abramov
9559ba486e Put react-scripts in dependencies, not devDependencies (#2657)
* Put react-scripts in dependencies, not devDependencies

* Sort dependencies on eject

* Remove CI check
2017-06-28 14:04:26 +01:00
Dan Abramov
3747144f9a Set npm loglevel to 'error' (#2635) 2017-06-27 15:39:42 +01:00
Dan Abramov
bed875c83d Don't run yarn after ejecting (#2634) 2017-06-27 15:09:46 +01:00
Paweł Jędrzejczyk
0644e80d36 add check to filter out custom scripts in eject command (#2562) 2017-06-27 14:11:14 +01:00
Pavol Madar
0d1521aabf Remove connect-history-api-fallback and cross-spawn dependencies from react-scripts (#751) (#2320) 2017-05-22 12:46:51 +01:00
pmadar
a1749f9154 Remove unnecessary dependencies(#751) (#2283)
* Remove unnecessary dependencies(#751)

* Sort alphabetically
2017-05-20 19:08:58 +01:00
Milo Kang
a257e7d0fa Ejecting should ensure you have clean git status (#2221)
* Ejecting should ensure you have clean git status

* Rename function

* Style

* Minor changes

- extract function
- exclude error output for missing git
- more descriptive error message
- no need to mutate answer
- fix answering "no" to return 0 exit code
2017-05-20 18:55:16 +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
Ryan Sullivan
10a180be9b Make coverage and snapshot Jest options overridable in package.json (#1830)
* Override Jest config collectCoverageFrom with package.json

* Protect against overriding other options

* Better error message

* Create Jest config early on eject

* Tweak wording

* Dry it up
2017-05-16 05:13:19 +01:00
Ian Sutherland
82687dd224 Replace prompt function from react-dev-utils with Inquirer.js. (#1772) 2017-05-14 23:14:56 +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
Dan Abramov
ccb5f84dc6 Fixes a silent crash when ejecting (#1810)
* Fixes a silent crash when ejecting

* Delete unnecessary files

* Remove references to eslintrc in Webpack config

* Fix lint

* Correct ESLint CLI options
2017-03-14 11:17:53 -04: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
Valerii Sorokobatko
d7bcc1916a Fix eject for linked react-scripts (#1736)
* fix eject for linked react-scripts

* path.resolve => resolveApp
2017-03-06 17:44:18 +00:00
Dan Abramov
1bfd5dafdf Fix internal linting setup and add missing headers (#1741) 2017-03-06 14:20:29 +00:00
Dan Abramov
23dc422606 Fix ejecting from a scoped fork (#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
2017-03-05 23:23:51 +00:00
Daniel Grant
b88d6655eb Modularise scripts (#1433)
* Refactor start script into modules

* Move dev server config into config file

* Replace eject file whitelist with a "remove-file-on-eject" flag

* Move utils into scripts folder (for inclusion in ejection)

* Add missed changes

* Pass showInstructions as an argument

* Fix eject bug

* Don't eject babelTransform
2017-03-03 22:05:07 -05:00
Joe Haddad
b609ac96fe Use posix paths for Jest config during eject (#1635)
Resolves #1417 and #1498.
2017-02-24 17:06:54 -05:00
Valerii Sorokobatko
d6a83aa887 Remove .bin files defined at react-scripts/package.json after eject (#1567)
* remove bin files after eject defined at package.json

* add swallowing try/catch
2017-02-24 18:00:09 +00:00
Valerii Sorokobatko
bec009ce71 Fix workflow if react-scripts package is linked via npm-link (#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
2017-02-24 11:51:16 -05:00
pd4d10
b999405c67 Add missing '\n' to the end of package.json file (#1510) 2017-02-09 16:36:20 -05:00
creynders
bc2fc80898 eject: Additionally remove react-scripts from dependencies (#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.
2017-01-27 16:26:35 +00:00
Ville Immonen
1b645e2cc4 Use yarnpkg alias to run Yarn (#1365)
There’s a common tool included in Hadoop that also has a `yarn` command,
which created issues for users who had Hadoop installed:
* #1257
* #1363

Yarn also installs the command under `yarnpkg` alias (added in
cefa9a368d)
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.
2017-01-09 17:25:31 +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
Dan Abramov
5456ffff29 Let Jest handle all file types (#1197)
* Let Jest handle all file types

* Update regexes

* Fix exclusion regex to also exclude files without extension
* Be over-cautious with Windows paths because I'm not sure how Jest handles them

* There is no automatic babel-jest discovery now that we use transsform
2016-12-07 20:28:03 +00:00
Brian Ng
2da6edabab Replace rimraf with fs-extra functions (#1072) 2016-11-21 18:26:08 +00: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
Alice Rose
7ce4b6e0e4 Check for presence of folders before continuing eject. Closes #939. (#951) 2016-10-28 13:54:56 +01:00
Dan Abramov
df21070ede Tweak eject output 2016-10-03 13:41:49 +01:00
Andrew Zakordonets
27e76bebbe Beaufity output of eject.js script (#769)
* Beaufity output of eject.js script

* change formatting of the eject.js output and move colors to cyan

* change message about file copy

* add missing three dots to some statements in eject.js script

* change color of "copying files" line and do not repeat copy path anymore in log

* fix merge conflict

* Remove yellow color from "Removing dependency" line

* changing color to "Adding dependency" line

* Add line that outputs which react script is getting replaced by similar node script

* remove not used anymore colors

* add console line about updating Jest configs

* fix typo

* change formatting of replacing script output in eject.js

* remove "Writing package.json" file console output

* make quotes cyan in "Replacing script" console output

* update console log output for Jest, Babel, ESLint update and group them under one statement

* Style nits
2016-09-30 18:39:24 +01:00
Fernando Montoya
d72c749337 Moved Babel and ESLint config to package.json after ejecting (#773) 2016-09-27 11:17:46 +01:00
Shubheksha Jalan
1b6f58cf05 Forked react-scripts should retain the binary name (#754)
* Forked react-scripts should retain the binary name

* Forked react-scripts should retain the binary name -- fixed issue with regex

* Forked react-scripts should retain the binary name -- fixed style nit
2016-09-25 23:31:53 +01:00
Dan Abramov
176dd373b2 Fix eject 2016-09-23 22:20:40 +01:00
Dan Abramov
fda91eba56 Don't hardcode react-scripts package name (#728)
* Don't hardcode react-scripts package name

Fixes issue described in https://github.com/facebookincubator/create-react-app/issues/682#issuecomment-248781486.

* Update eject.js
2016-09-23 21:29:14 +01: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
Dan Abramov
9a70038b6d Preserve scripts/test.js after ejecting (#715)
Fixes #702
2016-09-23 12:35:26 +01:00
Dan Abramov
f54c9d8fb5 Remove other flow command 2016-09-23 12:07:29 +01:00
Dan Abramov
39d4da6165 Flow files are removed now 2016-09-23 12:06:57 +01:00
Dan Abramov
ba34b0b79b Eject .babelrc instead of separate configs (#705)
Fixes #410, #674
2016-09-23 00:33:14 +01:00
Dan Abramov
5bf14f3d18 Fix up eject script 2016-09-23 00:30:36 +01:00
Dan Abramov
bc6392afaf Add support for public/ folder (#703) 2016-09-22 21:25:34 +01:00
Ville Immonen
a2d0469c39 Create a shareable ESLint configuration package (#689)
* Move ESLint configuration to a separate package

* Remove the ESLint configuration, moved to eslint-config-react-app

* Update ESLint instructions

* Pin the package versions in eslint-config-react-app

* Add a README for eslint-config-react-app

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update package.json

* Update package.json

* Update production eslint-loader config

* Add the ESLint config to devDependencies of the repo
2016-09-21 15:08:02 +01:00
Ville Immonen
26464096d5 Set up a monorepo with Lerna 2016-09-19 10:52:19 +03:00