Skip to content

Cra sb #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 181 commits into from
May 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
5bb502a
Turn off CSS source maps
Timer Apr 24, 2017
927c539
Use custom sourcemap file names
Timer Apr 25, 2017
d721d4a
Modularize and extract crashOverlay to iframe (#1842)
Timer Apr 25, 2017
88f4f95
Upgrade webpack deps and use strictExportPresence (#2028)
Timer Apr 25, 2017
33a9700
Fix Netlify heading level. (#2033)
benpickles Apr 25, 2017
d65070e
Use prop-types package (#2029)
Timer Apr 25, 2017
bed9a39
Update README.md (#2040)
tijwelch Apr 28, 2017
3fac036
Define dev chunk names (#2050)
jstcki May 1, 2017
851a404
Suggest to create .eslintrc for IDE lint plugins (#2054)
gaearon May 1, 2017
629d575
Update README.md (#2058)
luftywiranda13 May 1, 2017
f762728
Fix instructions for serving with now (#2052)
davidascher May 2, 2017
f1563b9
Temporarily pin Yarn to fix CI
gaearon May 3, 2017
59c439b
Fixed documentation link for storybook in README.md (#2081)
May 4, 2017
5a7d8e8
Forbid using window properties as global variables (#1840)
sidoshi May 5, 2017
94149c7
Ignore the yarn cache directory (#2063)
jmorrell May 8, 2017
3a527f2
Revert "Forbid using window properties as global variables" (#2099)
gaearon May 8, 2017
2d7a1bb
Minor tweaks for crash overlay (#2101)
gaearon May 9, 2017
f35593c
Bump minimal Node version to 6 (#1897)
ianschmitz May 9, 2017
0a50395
Prettify errors and warnings for Webpack 2 (#2113)
gaearon May 10, 2017
1acc3a4
Do not parse `.eslintignore` (#2115)
Timer May 10, 2017
70768b3
Add `react-error-overlay` package (#2111)
Timer May 10, 2017
8d4604e
Default to 0.0.0.0 (#2117)
Timer May 11, 2017
6959077
Omit ESLint warnings when there are ESLint errors (#2120)
gaearon May 11, 2017
942cf62
Adds tests for the overlay (#2118)
Timer May 11, 2017
efd99a9
disable ignoring unused vars prefixed with _ (#1763)
sidoshi May 11, 2017
a4bd567
Bump React in development (#2122)
gaearon May 11, 2017
3521eb7
Make error box messages friendlier (#2123)
gaearon May 11, 2017
1ede6a8
Only show first error (#2125)
gaearon May 11, 2017
2b59654
Fix a bad condition
gaearon May 11, 2017
2de95c4
Update Sass docs (#2114)
kellyrmilligan May 12, 2017
80a7fc3
Feature/different env config files #1343 (#1344)
tuchk4 May 12, 2017
68fcba4
Add note about yarn.lock in CONTRIBUTING.md (#2135)
viankakrisna May 12, 2017
fa48296
Update README.md (#2137)
cesarvarela May 12, 2017
76d2d84
Improve unmapper file heuristic, add limited warning support, and ign…
Timer May 13, 2017
b25c133
Skip React frames that are too close (#2143)
gaearon May 14, 2017
4434467
Click to view source from error overlay (#2141)
gaearon May 14, 2017
ac7777d
Work around weird inferred name in Chrome
gaearon May 14, 2017
8b451c3
Don't collapse unintentional top-level errors (#2145)
gaearon May 14, 2017
dbd12f1
Add a missing color mapping (#2146)
Timer May 14, 2017
06e73fa
Blacklist confusing global variables (#2130)
sidoshi May 14, 2017
be43292
Temporarily fork detect-port (#2147)
Timer May 14, 2017
82687dd
Replace prompt function from react-dev-utils with Inquirer.js. (#1772)
iansu May 14, 2017
10c734b
Print error messages for editor integration (#2150)
gaearon May 14, 2017
f17448e
Add custom eslint formatter (#2138)
sidoshi May 14, 2017
77087da
Fix CI
Timer May 14, 2017
21349c5
Tweak error and warning output (#2152)
gaearon May 15, 2017
5e35645
Focus on line in eslint messages
gaearon May 15, 2017
75fc094
Fix CI
Timer May 15, 2017
9b22817
[Internal] Warn for missing brackets (#2151)
Timer May 15, 2017
71a27c0
Allow custom proxies in development (#1790)
jamesblight May 15, 2017
281e8d2
Add support for IPv6 hosts
Timer May 15, 2017
4dc7c86
Prefer localhost as an address (#2154)
Timer May 15, 2017
ac63130
Show network address on start (#2155)
Timer May 15, 2017
172264e
Bump webpack packages
gaearon May 15, 2017
9e733b5
Internal Webpack paths should not be clickable
gaearon May 15, 2017
f87e613
Make error/warning output more useful (#2161)
gaearon May 15, 2017
e17c392
Fix lint
Timer May 15, 2017
f366028
Fix CI
Timer May 15, 2017
71e0960
Update to Jest 19 (#1614)
rogeliog May 15, 2017
fcb7dcf
Put console.stack() behind a react vendor prefix (#2164)
gaearon May 15, 2017
5ecda24
Unpin Yarn (#2124)
gaearon May 15, 2017
7bff715
ESLint Config: Upgrade eslint-plugin-jsx-a11y and activate more rules…
AlmeroSteyn May 15, 2017
814365b
Removing extra `eslint` rules (#2064)
anilreddykatta May 15, 2017
d6dbfc0
Support hoisting react-scripts and add require.resolve() to loaders (…
gaearon May 15, 2017
8f028ae
Support node scripts in BROWSER (#1590)
GAumala May 15, 2017
9b231d4
Enable CSS sourcemaps in production (#2168)
gaearon May 15, 2017
044e57b
Adding plugin postcss-flexbugs-fixes and flexbox: 'no-2009' to Autopr…
cr101 May 16, 2017
1832b76
Try to fix CI
gaearon May 16, 2017
9f8a001
Try again
gaearon May 16, 2017
c5e5eb5
Only run tests in <rootDir>/src (#544) (#1808)
kindrowboat May 16, 2017
0ffed85
Bump dependencies (#2170)
gaearon May 16, 2017
98fec2d
react-dev-utils/openBrowser now supports urls with 2+ params (#2076)
alisonmonteiro May 16, 2017
db2f2ed
Jest 20 (#2171)
gaearon May 16, 2017
10a180b
Make coverage and snapshot Jest options overridable in package.json (…
ryansully May 16, 2017
5868913
Bump versions
gaearon May 16, 2017
50aaae6
Resolve regenerator runtime relative to react-scripts (#2175)
gaearon May 16, 2017
66792dd
Fix Flow hopefully
gaearon May 16, 2017
dadf93b
Disable require.ensure() warning (#2177)
gaearon May 16, 2017
134d229
Reenable require.ensure()
gaearon May 16, 2017
46eeabc
Tweak colors for better contrast on Windows (#2180)
gaearon May 16, 2017
e280254
Handle errors from port detector (#2182)
gaearon May 16, 2017
493e5a6
Tweak lint rules (#2186)
gaearon May 16, 2017
65ff548
Ignore Moment.js locales by default (#2187)
gaearon May 16, 2017
e1f22b5
Disable Yarn on CI temporarily
gaearon May 17, 2017
a61be9c
Add module scope plugin (#2189)
Timer May 17, 2017
e7c113e
Webpack config typo (#2193)
Justkant May 17, 2017
c7c3a52
PWA-ification, via SWPrecacheWebpackPlugin + manifest.json (#1728)
jeffposnick May 17, 2017
d9a2974
Tidy up some build logs (#2197)
gaearon May 17, 2017
ee850f5
Bump Jest to 20.0.3 (#2196)
gaearon May 17, 2017
c27d765
Test module scoping (#2198)
Timer May 17, 2017
fd2a800
Disable Uglify reduce_vars (#2200)
gaearon May 17, 2017
68f95d4
Tweaking error overlay styles (#2201)
bvaughn May 17, 2017
c82c4f0
Refactor and improve build output (#2202)
gaearon May 18, 2017
0681e24
Tweaked error overlay styles (pt2) (#2208)
bvaughn May 18, 2017
8dc9217
Move more logic from react-scripts to react-dev-utils (#2209)
gaearon May 18, 2017
0d0536f
Fix vertical alignment of close button
gaearon May 18, 2017
02968ec
Cleaned up next/prev error arrow styles; arrows wrap around when clic…
bvaughn May 18, 2017
2ae1772
Add temporary support for Node 4.x to global CLI (#2214)
gaearon May 18, 2017
07c75aa
Replace text-align: start with left to fix Edge (#2215)
gaearon May 18, 2017
5f93bc4
ES6 syntax (#2213)
shashkovdanil May 18, 2017
55afd86
Move error overlay middleware (#2216)
gaearon May 18, 2017
43b819c
"rule keywords" => "keywords"
gaearon May 18, 2017
6c8b18b
Improve interaction between compile and runtime overlays (#2219)
gaearon May 18, 2017
b98ba3d
Better document PWA stuff
gaearon May 19, 2017
741c4f0
Enable 1.0 docs (#2220)
Timer May 19, 2017
54ea478
Add documentation about using code splitting (#1801)
tharakawj May 19, 2017
a5e88cd
Swap changelogs (#2222)
gaearon May 19, 2017
bf9eca2
Publish
gaearon May 19, 2017
26c9a3d
Update CHANGELOG.md
gaearon May 19, 2017
af7fbae
March -> May
gaearon May 19, 2017
499adbe
Fix shortcut handling in react-error-overlay (#2238)
Gandem May 19, 2017
70a7f28
Add explicit package dependence (#2243)
Timer May 19, 2017
4a32171
Fix read of .env variables (#2242)
ApacheEx May 19, 2017
e0b444e
Gracefully shut down the server on signals (#2246)
gaearon May 19, 2017
2023e44
Shame on me
gaearon May 19, 2017
5410aa4
Correct docs on which .env.* files are supported. (#2247)
AJamesPhillips May 19, 2017
9d98ca9
Hide React Storybook from the User Guide while it's incompatible (#2252)
gaearon May 19, 2017
1834cb5
Show customized build path for serve instruction (#2229)
chyipin May 19, 2017
f3f5599
Ignore .env.local in test environment (#2250)
gaearon May 19, 2017
c749de7
add noscript to template's index.html (#2224)
viankakrisna May 19, 2017
22ca584
Work around Windows path issue in SWPrecacheWebpackPlugin (#2255)
gaearon May 19, 2017
e939a5b
Turn off operator-assignment stylistic rule (#2256)
gaearon May 19, 2017
bf7df73
update readme with example of include path (#2258)
kellyrmilligan May 19, 2017
d6d2f6d
update reference with new name (#2259)
enguerran May 19, 2017
3cd2267
Additional fix to service worker config for "homepage" field (#2262)
gaearon May 19, 2017
d24311e
Always resolve NODE_PATH (#2261)
gaearon May 19, 2017
3a3be74
Fix a bug on empty NODE_PATH (#2264)
gaearon May 19, 2017
e806332
Shut down server silently, as it is too noisy
gaearon May 19, 2017
b460795
Add changelog for 1.0.1 (#2266)
gaearon May 19, 2017
cd5c6d5
Publish
gaearon May 19, 2017
68cd598
Fix missing dependency (#2269)
GreenGremlin May 19, 2017
2143a30
Describe build in less fluffy terms
gaearon May 19, 2017
34b4ad8
Update README.md
gaearon May 19, 2017
95cbcc4
Update README.md
gaearon May 19, 2017
4e886f7
Update CHANGELOG.md
gaearon May 19, 2017
d3e8536
Add WSL support to launchEditor utility (#2282)
noinkling May 20, 2017
ba0d0da
Only enable host check if you use proxy, and add a way to opt out of …
gaearon May 20, 2017
a257e7d
Ejecting should ensure you have clean git status (#2221)
milocosmopolitan May 20, 2017
f3ff3f2
Add missing license headers
gaearon May 20, 2017
d76c1b7
Wrap console calls into a check (#2290)
gaearon May 20, 2017
eadfad2
Provide a no-op SW that will be served by the dev environment. (#2276)
jeffposnick May 20, 2017
a1749f9
Remove unnecessary dependencies(#751) (#2283)
pmadar May 20, 2017
73356a1
Add changelog for 1.0.2 (#2291)
gaearon May 20, 2017
ae0cb23
Publish
gaearon May 20, 2017
d558eaa
Roll back to an older version of case-sensitive-paths-webpack-plugin …
gaearon May 21, 2017
7348ca9
Wrap console calls into a check (#2301)
BrodaNoel May 21, 2017
3260d17
Remove `flowtype/require-valid-file-annotation` temporarily. (#2311)
Robdel12 May 21, 2017
2430b56
Ensure address is private (#2297)
Timer May 21, 2017
d34a892
Changelog for 1.0.3 (#2315)
gaearon May 21, 2017
d649b8a
Publish
gaearon May 21, 2017
6c9b574
Remove tarec from README (#2323)
geowarin May 22, 2017
812658a
1.0.4 changelog
gaearon May 22, 2017
7e25c9a
Publish
gaearon May 22, 2017
0d1521a
Remove connect-history-api-fallback and cross-spawn dependencies from…
pmadar May 22, 2017
42efedb
Allow declaring variables before use in a scope above (#2325)
gaearon May 22, 2017
9cfa355
Limit console warnings to 5 files at most (#2327)
gaearon May 22, 2017
25f81f2
Files in public/ folder should not be requested through proxy (#2326)
gaearon May 22, 2017
d72b6b4
Add changelog for 1.0.5 (#2329)
gaearon May 22, 2017
6e9b730
Add "Migrating" section
gaearon May 22, 2017
2558c3e
Publish
gaearon May 22, 2017
bef503e
Add missing files to README (#2334)
jesselpalmer May 23, 2017
913689f
Update CHANGELOG.md
gaearon May 23, 2017
a29808a
Don't resolve localhost if on network (#2332)
Timer May 24, 2017
0d2989b
Resolve flow errors in eslint JSX a11y (#2346)
iainbeeston May 24, 2017
55fe136
Add navigateFallbackWhitelist /__* to SW Precache config (#2347)
ryansully May 24, 2017
e4f7d54
Add changelog for 1.0.6 (#2348)
gaearon May 24, 2017
7a1873c
Publish
gaearon May 24, 2017
cfd2635
Fix hot reloading for WebpackDevServer after eject (#1721)
gaearon Mar 5, 2017
19a8321
Lint internal scripts with eslint:recommended (#1729)
gaearon Mar 5, 2017
d1f1467
Fix internal linting setup and add missing headers (#1741)
gaearon Mar 6, 2017
d9758a2
Add linked modules test (0.9.x) (#1912)
Timer Apr 15, 2017
cea9d39
Add note about installing watchman (#1950)
just-boris Apr 15, 2017
dd2574f
Support for using create-react-app with Spring Boot
jwbennet Apr 30, 2017
3bdc073
Updated project so it adds the customized scripts by default
jwbennet Apr 30, 2017
b0ad89c
Added support for dynamic templates
jwbennet May 1, 2017
ecd3697
Added support for adding react-router and examples
jwbennet May 6, 2017
dcdeb99
Added support for combining React Router with Bootstrap and Redux
jwbennet May 6, 2017
6a6aa02
Modified the demo module so its actions are prefixed with the applica…
jwbennet May 6, 2017
950dcdf
Added support for Redux Form
jwbennet May 7, 2017
86ad43c
Added dependency for setting document title with React Router
jwbennet May 7, 2017
4dea24f
re-incorporate changes for spring-boot
athill May 24, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"rules": {
"no-console": "off",
"strict": ["error", "global"]
"strict": ["error", "global"],
"curly": "warn"
}
}
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
language: node_js
node_js:
- 4
- 6
- 7
cache:
Expand All @@ -25,5 +24,7 @@ matrix:
include:
- node_js: 0.10
env: TEST_SUITE=simple
- node_js: 6
env: USE_YARN=yes TEST_SUITE=simple
# There's a weird Yarn/Lerna bug related to prerelease versions.
# TODO: reenable after we ship 1.0.
# - node_js: 6
# env: USE_YARN=yes TEST_SUITE=simple
1,374 changes: 1,374 additions & 0 deletions CHANGELOG-0.x.md

Large diffs are not rendered by default.

1,600 changes: 453 additions & 1,147 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ All functionality must be retained (and configuration given to the user) if they

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 @@ -88,6 +90,8 @@ cd my-app

and then run `npm start` or `npm run build`.

*Note: if you are using yarn, we suggest that you use `yarn install --no-lockfile` instead of the bare `yarn` or `yarn install` because we [intentionally](https://github.com/facebookincubator/create-react-app/pull/2014#issuecomment-300811661) do not ignore or add yarn.lock to our repo.*

## Cutting a Release

1. Tag all merged pull requests that go into the release with the relevant milestone. Each merged PR should also be labeled with one of the [labels](https://github.com/facebookincubator/create-react-app/labels) named `tag: ...` to indicate what kind of change it is.
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ Install it once globally:
npm install -g create-react-app
```

**You’ll need to have Node >= 4 on your machine**.

**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.
**You’ll need to have Node >= 6 on your machine**. 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 Create React App itself.

Expand All @@ -67,13 +65,15 @@ my-app/
public/
favicon.ico
index.html
manifest.json
src/
App.css
App.js
App.test.js
index.css
index.js
logo.svg
registerServiceWorker.js
```

No configuration or complicated folder structures, just the files you need to build your app.<br>
Expand All @@ -92,7 +92,7 @@ You will see the build errors and lint warnings in the console.
### `npm test` or `yarn test`

Runs the test watcher in an interactive mode.<br>
By default, runs tests related to files changes since the last commit.
By default, runs tests related to files changed 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)

Expand All @@ -102,7 +102,9 @@ 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.

The build is minified and the filenames include the hashes.<br>
Your app is ready to be deployed!
By default, it also [includes a service worker](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app) so that your app loads from local cache on future visits.

Your app is ready to be deployed.

## User Guide

Expand All @@ -118,6 +120,7 @@ The [User Guide](https://github.com/facebookincubator/create-react-app/blob/mast
- [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)
- [Code Splitting](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting)
- [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)
Expand All @@ -134,7 +137,6 @@ The [User Guide](https://github.com/facebookincubator/create-react-app/blob/mast
- [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)
Expand Down Expand Up @@ -164,6 +166,7 @@ Please refer to the [User Guide](https://github.com/facebookincubator/create-rea
* Import CSS and image files directly from JavaScript.
* Autoprefixed CSS, so you don’t need `-webkit` or other prefixes.
* A `build` script to bundle JS, CSS, and images for production, with sourcemaps.
* An offline-first [service worker](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers) and a [web app manifest](https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/), meeting all the [Progressive Web App](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app) criteria.

**The feature set is intentionally limited**. It doesn’t support advanced features such as server rendering or CSS modules. The tool is also **non-configurable** because it is hard to provide a cohesive experience and easy updates across a set of tools when the user can tweak anything.

Expand Down Expand Up @@ -243,7 +246,6 @@ Notable alternatives also include:
* [aik](https://github.com/d4rkr00t/aik)
* [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>
Expand Down
6 changes: 0 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ environment:
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
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"changelog": "lerna-changelog",
"create-react-app": "tasks/cra.sh",
"e2e": "tasks/e2e-simple.sh",
"postinstall": "lerna bootstrap",
"postinstall": "lerna bootstrap && cd packages/react-error-overlay/ && npm run build:prod",
"publish": "tasks/release.sh",
"start": "node packages/react-scripts/scripts/start.js",
"test": "node packages/react-scripts/scripts/test.js --env=jsdom",
"format": "prettier --trailing-comma es5 --single-quote --write 'packages/*/*.js' 'packages/*/!(node_modules)/**/*.js'",
"precommit": "lint-staged"
},
"devDependencies": {
"eslint": "3.16.1",
"eslint": "3.19.0",
"husky": "^0.13.2",
"lerna": "2.0.0-beta.38",
"lerna-changelog": "^0.2.3",
Expand Down
4 changes: 0 additions & 4 deletions packages/babel-preset-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

var path = require('path');

const plugins = [
// class { handleClick = () => { } }
require.resolve('babel-plugin-transform-class-properties'),
Expand All @@ -36,8 +34,6 @@ const plugins = [
helpers: false,
polyfill: false,
regenerator: true,
// Resolve the Babel runtime relative to the config.
moduleName: path.dirname(require.resolve('babel-runtime/package')),
},
],
];
Expand Down
18 changes: 10 additions & 8 deletions packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-react-app",
"version": "2.1.1",
"version": "3.0.0",
"description": "Babel preset used by Create React App",
"repository": "facebookincubator/create-react-app",
"license": "BSD-3-Clause",
Expand All @@ -11,18 +11,20 @@
"index.js"
],
"dependencies": {
"babel-plugin-dynamic-import-node": "1.0.0",
"babel-plugin-dynamic-import-node": "1.0.2",
"babel-plugin-syntax-dynamic-import": "6.18.0",
"babel-plugin-transform-class-properties": "6.23.0",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-object-rest-spread": "6.23.0",
"babel-plugin-transform-react-constant-elements": "6.23.0",
"babel-plugin-transform-react-jsx": "6.23.0",
"babel-plugin-transform-react-jsx": "6.24.1",
"babel-plugin-transform-react-jsx-self": "6.22.0",
"babel-plugin-transform-react-jsx-source": "6.22.0",
"babel-plugin-transform-regenerator": "6.22.0",
"babel-plugin-transform-regenerator": "6.24.1",
"babel-plugin-transform-runtime": "6.23.0",
"babel-preset-env": "1.2.1",
"babel-preset-react": "6.23.0",
"babel-runtime": "6.23.0"
"babel-preset-env": "1.4.0",
"babel-preset-react": "6.24.1"
},
"peerDependencies": {
"babel-runtime": "^6.23.0"
}
}
92 changes: 67 additions & 25 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// tell people to update their global version of create-react-app.
//
// Also be careful with new language features.
// This file must work on Node 4+.
// This file must work on Node 6+.
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// /!\ DO NOT MODIFY THIS FILE /!\
Expand Down Expand Up @@ -160,7 +160,34 @@ function createApp(name, verbose, version, template) {
const originalDirectory = process.cwd();
process.chdir(root);

run(root, appName, version, verbose, originalDirectory, template);
if (!semver.satisfies(process.version, '>=6.0.0')) {
console.log(
chalk.yellow(
`You are using Node ${process.version} so the project will be boostrapped with an old unsupported version of tools.\n\n` +
`Please update to Node 6 or higher for a better, fully supported experience.\n`
)
);
// Fall back to latest supported react-scripts on Node 4
version = '[email protected]';
}

const useYarn = shouldUseYarn();
if (!useYarn) {
const npmInfo = checkNpmVersion();
if (!npmInfo.hasMinNpm) {
if (npmInfo.npmVersion) {
console.log(
chalk.yellow(
`You are using npm ${npmInfo.npmVersion} so the project will be boostrapped with an old unsupported version of tools.\n\n` +
`Please update to npm 3 or higher for a better, fully supported experience.\n`
)
);
}
// Fall back to latest supported react-scripts for npm 3
version = '[email protected]';
}
}
run(root, appName, version, verbose, originalDirectory, template, useYarn);
}

function shouldUseYarn() {
Expand Down Expand Up @@ -190,7 +217,6 @@ function install(useYarn, dependencies, verbose, isOnline) {
console.log();
}
} else {
checkNpmVersion();
command = 'npm';
args = ['install', '--save', '--save-exact'].concat(dependencies);
}
Expand All @@ -212,13 +238,19 @@ function install(useYarn, dependencies, verbose, isOnline) {
});
}

function run(root, appName, version, verbose, originalDirectory, template) {
function run(
root,
appName,
version,
verbose,
originalDirectory,
template,
useYarn
) {
const packageToInstall = getInstallPackage(version);
const allDependencies = ['react', 'react-dom', packageToInstall];

console.log('Installing packages. This might take a couple minutes.');

const useYarn = shouldUseYarn();
getPackageName(packageToInstall)
.then(packageName => checkIfOnline(useYarn).then(isOnline => ({
isOnline: isOnline,
Expand Down Expand Up @@ -253,6 +285,15 @@ function run(root, appName, version, verbose, originalDirectory, template) {
);
const init = require(scriptsPath);
init(root, appName, verbose, originalDirectory, template);

if (version === '[email protected]') {
console.log(
chalk.yellow(
`\nNote: the project was boostrapped with an old unsupported version of tools.\n` +
`Please update to Node >=6 and npm >=3 to get supported tools in new projects.\n`
)
);
}
})
.catch(reason => {
console.log();
Expand Down Expand Up @@ -302,7 +343,7 @@ function run(root, appName, version, verbose, originalDirectory, template) {
}

function getInstallPackage(version) {
let packageToInstall = 'react-scripts';
let packageToInstall = '@jwbennet/spring-boot-react-scripts';
const validSemver = semver.valid(version);
if (validSemver) {
packageToInstall += `@${validSemver}`;
Expand Down Expand Up @@ -398,24 +439,18 @@ function getPackageName(installPackage) {
}

function checkNpmVersion() {
let isNpm2 = false;
let hasMinNpm = false;
let npmVersion = null;
try {
const npmVersion = execSync('npm --version').toString();
isNpm2 = semver.lt(npmVersion, '3.0.0');
npmVersion = execSync('npm --version').toString().trim();
hasMinNpm = semver.gte(npmVersion, '3.0.0');
} catch (err) {
return;
// ignore
}
if (!isNpm2) {
return;
}
console.log(chalk.yellow('It looks like you are using npm 2.'));
console.log(
chalk.yellow(
'We suggest using npm 3 or Yarn for faster install times ' +
'and less disk space usage.'
)
);
console.log();
return {
hasMinNpm: hasMinNpm,
npmVersion: npmVersion,
};
}

function checkNodeVersion(packageName) {
Expand Down Expand Up @@ -457,7 +492,7 @@ function checkAppName(appName) {

// TODO: there should be a single place that holds the dependencies
const dependencies = ['react', 'react-dom'];
const devDependencies = ['react-scripts'];
const devDependencies = ['@jwbennet/spring-boot-react-scripts'];
const allDependencies = dependencies.concat(devDependencies).sort();
if (allDependencies.indexOf(appName) >= 0) {
console.error(
Expand Down Expand Up @@ -530,12 +565,19 @@ function isSafeToCreateProjectIn(root) {
'.idea',
'README.md',
'LICENSE',
'web.iml',
'.hg',
'.hgignore',
'.hgcheck',
'.mvn',
'mvnw',
'mvnw.cmd',
'pom.xml',
'src',
];
return fs.readdirSync(root).every(file => validFiles.indexOf(file) >= 0);
return fs
.readdirSync(root)
.filter(file => !file.endsWith('.iml'))
.every(file => validFiles.indexOf(file) >= 0);
}

function checkIfOnline(useYarn) {
Expand Down
5 changes: 4 additions & 1 deletion packages/create-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
var chalk = require('chalk');

var currentNodeVersion = process.versions.node;
if (currentNodeVersion.split('.')[0] < 4) {
var semver = currentNodeVersion.split('.');
var major = semver[0];

if (major < 4) {
console.error(
chalk.red(
'You are running Node ' +
Expand Down
Loading