Commit Graph

29 Commits

Author SHA1 Message Date
Maël Nison
9e074bbf08 Plug'n'Play support (#5136)
* Adds the PnP plugin for Webpack to find dependencies when working under PnP

* Adds configuration for jest

* Adds an e2e test for when using PnP

* Avoids cra from crashing at the engine check

* Avoids cra from crashing when initializing react-scripts

* Makes the ownPath portable

* Fixes linting

* Bumps to pnp-webpack-plugin@1.1.0, removes symlinks: false

* Adds a --use-pnp option

* Pin version
2018-10-01 15:53:07 +01:00
Joe Haddad
62b0942be6 Change default test environment to jsdom (#5074) 2018-09-24 11:30:04 -04:00
Joe Haddad
7be14b914f Tweak init.js after merge 2018-09-21 08:19:14 -04:00
Aaron Reisman
2aaf71eed0 Add eslintConfig to new projects automatically (#1457) 2018-09-21 08:18:18 -04:00
Dan Abramov
d49ffde4e6 Fix the E2E script (#3888)
* Fix the E2E script

* Delete .git if committing failed
2018-01-21 23:31:03 +00:00
Dan Abramov
b3527d7783 Fix git init race condition (#3877) 2018-01-20 18:32:41 +00:00
Maurice de Beijer
247e5c90a0 Create git repository with initial commit (#1288)
* Create git repo with initial commit

* Fixe commit message

* Added the git repo to the docs

* Bail if we are in a mercurial repository

* Removed Chore from commit mesage

* Create repo after installing react and react-dom

* Removed docs

* Commit changes when ejecting

* Update after review

* git add -A instead of git add . after code review
2018-01-19 13:12:34 +00:00
Joe Haddad
2e59c5412c Offer to set default browsers (#3792)
* Offer to set browser defaults

* Catch error on no

* Add ending newlines

* Ensure we re-check to prevent defaults from leaking

* Reduce nesting

* Add defaults message

* More explicit
2018-01-15 00:09:07 -05:00
Joe Haddad
aa67a4f78e Loosen Babel preset to use browserslist (#3770)
* Provide better defaults

* Let babel determine features to compile

* meh

* Remove setting of BABEL_ENV

* Revert "Remove setting of BABEL_ENV"

This reverts commit ee2db707faa8b9ada3e7a668e8a94944f5955a1e.

* Set browsers to ie9
2018-01-15 00:08:14 -05:00
Andrey Sitnik
0a331710aa Move browsers to cross-tool config (#3644) 2018-01-15 00:06:24 -05:00
Sophie Alpert
2e82ebb337 BSD+Patents -> MIT (#3189)
* File headers BSD+Patents -> MIT

* BSD+Patents -> MIT
2017-09-26 10:30:05 +01:00
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
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
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
Geoff Davis
052fcdd986 Suggest "yarn build" rather than "yarn run build" (#1800)
* Fix for issue #1798: Suggested 'yarn build' versus 'yarn run build'

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

* conditionally show 'run' if Yarn is not available
2017-03-12 15:13:41 +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
Lorenzo Palmes
43873dc9b8 Display yarn instead of yarnpkg when creating a new app (#1747)
* Display yarn instead of yarnpkg

* Refactored displayd commands

* Removed testing directory
2017-03-07 14:29:39 +00:00
Dan Abramov
1bfd5dafdf Fix internal linting setup and add missing headers (#1741) 2017-03-06 14:20:29 +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
Jirat Ki
a82896c3e3 Install react, react-dom, and react-scripts at the same time (#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 #1239
2017-02-22 22:55:41 -05:00
Fabrizio Castellarin
9099570b94 Use a more sophisticated template for end-to-end testing. (#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
2017-01-23 20:43:16 +01: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
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
Christopher Chedeau
52bc72fbde Remove the . at the end of the init message (#760)
Otherwise it makes it an invalid path :(
2016-09-26 10:22:55 +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
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
Ville Immonen
26464096d5 Set up a monorepo with Lerna 2016-09-19 10:52:19 +03:00