Commit Graph

270 Commits

Author SHA1 Message Date
Joe Haddad
d65070edc4 Use prop-types package (#2029) 2017-04-25 10:33:55 -04:00
Ben Pickles
33a9700173 Fix Netlify heading level. (#2033) 2017-04-25 15:14:06 +01:00
Joe Haddad
88f4f95ae8 Upgrade webpack deps and use strictExportPresence (#2028) 2017-04-25 10:36:18 +01:00
Joe Haddad
927c539bc5 Use custom sourcemap file names 2017-04-24 21:51:59 -04:00
Joe Haddad
5bb502a28f Turn off CSS source maps 2017-04-24 14:54:37 -04:00
Michael Wayman
a1b56cf8b3 Update README.md CSS Preprocessor --> node-sass-chokidar alternative (#1987)
* resolves facebookincubator/create-react-app#1986 updates CSS Preprocessor docs to include information on node-sass-chokidar alternative to node-sass

* Update README.md
2017-04-22 15:33:49 -04:00
Ade Viankakrisna Fadlil
d6173fd2a4 Minify and map css (#2013)
Minify and map css
2017-04-21 21:15:58 -04:00
Buns Shar
c0fd569654 Resolve localhost when offline on Windows (#1839)
* Change proxy localhost to I27.0.0.1 for windows

* Update comment

* resolve localhost IP with DNS lookup on windows

* Fix CI errors

* Promisify addWebpackMiddleware

* Remove Node 6 syntax

* Update addWebpackMiddleware.js

* Actually use the resolved proxy
2017-04-21 16:23:08 -04:00
Marco Fugaro
31a38b34c4 removed options in UglifyJsPlugin which are equal to the defaults (#1993)
* removed redundant already default options in UglifyJsPlugin

* re-enabled remove comments Uglify option

JSDoc-style comments weren't being removed
2017-04-19 11:40:42 +01:00
Igor Ramos
05f3f5ee81 Update doc server example to work from any directory (#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
2017-04-18 21:38:07 -04:00
Gabriel Aumala
ef86877331 Start the dev server at the specified host (#1301)
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.
2017-04-18 21:06:54 -04:00
Joe Haddad
31243283ab Add linked modules test (#1913) 2017-04-14 23:46:04 -04:00
Buns Shar
f61cba104e Ensure proxy url starts with http:// or https:// (#1890) 2017-04-14 22:51:29 -04:00
Joseph Race
cb41a76eaa Update information in User Guide for Enzyme dependency (#1982) 2017-04-14 13:20:20 +01:00
Dan Abramov
798572a8bc Note that only jest-enzyme@2.x is compatible 2017-04-09 20:02:56 +01:00
Tom Canac
c83ee7a302 Suggest Yarn in HTML template (#1911)
* Fix npm to yarn

* yarn & npm

* Update index.html

* Switch ordering of suggestion

We should suggest NPM first for new users.
2017-04-05 13:28:32 -04:00
Joe Haddad
7b124e7fd4 Re-disable babel modules transform (#1894)
* Upgrade webpack & related deps

* Disable module transform (requires webpack 2+)
2017-03-26 23:50:36 -04:00
Asa Ayers
47a8148fb1 Fix importing npm linked libraries (#1359)
* Fix importing npm linked libraries

* Update webpack.config.dev.js

* Update webpack.config.prod.js
2017-03-22 20:29:53 -04:00
Andrej Badin
bc6fc95055 Update detect-port (#1861)
Previous changes caused `detect-port` to pick random port on app startup. Update fixes this regression, `detect-port` pick next available port instead.
2017-03-22 18:04:52 -04:00
Jonathan
2ac3f99b69 Fix responsive behavior in iOS 9+ (#1821)
* Adding shrink-to-fit=no for proper responsive handling on Safari 9+
2017-03-22 13:49:25 -04:00
Stoicescu Cristi
c436bf356e User Guide: Removed blockquote from code section, due to markdown conflict (#1869)
* Removed blockquote from code section

* Fix the fix
2017-03-21 01:21:09 +00:00
Dan Abramov
35d84ef052 Make Surge guide more focused 2017-03-18 15:28:37 +00: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
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
Ryan Walters
0c0c5c1f24 Run CI on Node 7; Bump detect-port: 1.0.1 -> 1.1.0 (#1776) (#1783)
* Run CI on Node 7

* Bump detect-port: 1.0.1 -> 1.1.0

* Run AppVeyor CI on Node 7
2017-03-09 21:01:43 +00: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
Andres Suarez
837f5449a5 Add yarn steps for adding flow (#1756)
[skip ci]
2017-03-07 21:44:35 +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
Joe Haddad
3b15f0a247 Update deps for webpack 2 2017-03-07 01:31:53 -05:00
Rory Hunter
2ac1b38ec6 Whitelist files that can be embedded through url-loader (#1305)
* Whitelist files that can be embedded through url-loader

Change the current catch-all loader to use file-loader instead of
url-loader, and exclude common image file extensons. Add another url-loader
for images, configured identically to the original catch-all loader.

Part of issue #1293.

* Update tests to reflect change in loader config

* Integration test fix

* More CI fixes

* Work around broken loader-utils behaviour in integration tests

* Revise the documentation around file loading

* Documentation tweaks

* Docs tweak

* Update test now that webpack/loader-utils has been updated

* Update react-scripts to depend on babel-loader@7.0.0-alpha.2

* Bump deps
2017-03-07 01:24:56 -05:00
Joe Haddad
ed5c016d61 Add runtime error overlay (#1101)
* Add red box prototype

* Unmount fail node when hot-reloaded (future proofing)

* Slightly improve error reason

* Add Chrome unhandledrejection listener

* Close red box when Escape is pressed

* Construct our own source if not available

* Resolve sourcemaps for friendlier traces

* Allow error to be scrolled

* Only utilize sourcemaps, not the magic. :(

* Make view similar to React Native

* Fix an uncaught syntax error

* Add workaround for Firefox 50

* Add a hint for closing the prompt

* Multiple error support
When there's multiple errors, simply state that there are more instead of re-rendering

* Log any renderer error

* Dim node_modules in display

* Override chrome stack trace limit

* Magic: show me some source!

* Add ability to toggle internal calls

* Switch text from show -> hide

* Change color scheme to something easier on the eyes

* Change UI to be friendlier (thanks @nicinabox)
https://github.com/facebookincubator/create-react-app/pull/1101#issuecomment-263621057
https://github.com/facebookincubator/create-react-app/pull/1101#issuecomment-263636171

* Update styles

* Add container inside overlay

* Apply pre style

* Add line highlight

* Add omitted frames ui

* Move yellow to var

* Do all function names in black

* Adapt container based on screen size

* Extract ansiHTML

Use base16-github theme

* Linting

* Add syntax highlighting of errors

* Linting

* Remove white background

* Append new files to package.json

* Target exact version

* White is a little harsh, use same color as red box.

* Fix a bug where omitted frames would never be rendered
(under certain circumstances)

* Show local file path instead of confusing webpack://

* Do not require the entire file

* Remove css file

* Use context size, not a magic variable.

* Fix title regression

* Update dependency

* Do not center text for internal calls

* Temporarily disable links

* Switch internal toggle to 'i'

* Remove unnecessary rules from container style

* Reduce omitted frames font size

* Fix font family in pre > code

* Re-introduce line highlighting

* Object.<anonymous> -> (anonymous function)

* Add ability to see script source

* Add missing ansi mappings

* Remove SIAF

* Skip native functions

* Extract hints div function

* Extract renderers

* Refacor var names

* If source is disabled, don't use the line.

* Allow toggle between source

* Allow bundles to be expanded

* Wow, how did I let this one slip?

* Toggle text for UX/DX

* Make it so clicking Close unmounts the error component

* Do not allow hot reloading once an error is thrown

* Do not wrap lines for small displays

* Fix toggle when additional errors happen

* Make the close a button

* Capture and store errors

* Dispose on render; move additional logic

* Only make code not wrap

* Switch to a view-by-index method

* Allow user to switch between errors with arrow keys

* Fix text while switching between errors

* Update close button style

* Render additional errors at top

* Add left and right arrows

* Make frames pointy

* UTF-8 arrows

* Don't mount unneeded DOM node

* Switch to single changing text for compiled <-> source

* Don't display arrows with only one error.

* Collapsed and expanded

* Make sure the last collapse toggle is appended

* Do not show the stack trace if it doesn't resolve to a file we wrote

* Style container with media queries

* Do not allow x overflow; break words by default.

* Trim off whitespace of lines

* Remove padding since it's not outer-most

* Add footer message

* Extract css file to JS

* Only inject the css when the overlay is up

* Extract red variable

* Remove env

* Update babel-code-frame

* Set force color to true

* Extract out collapse div logic

* Remove arrow field

* Insert a top collapse

* Make browser friendlier

* Absolutify ^

* Make arrows buttons

* Accessify

* Let there be ES5

* Pretty css

* Use forEach where we can ...

* Remove extracted loop

* Fix IE compatibility

* Capture React warnings

* Add source override via React output parsing

* Whoops, fix arguments to crash.

* es5-ify

* Re-enable e2e-install directory test

* Only rewrite line number if it was resolved and leaves a line at bottom

* Rename failFast to crashOverlay

* Disable console proxy

* Appease linter

* Appease more
2017-03-06 21:59:57 -05:00
Joe Haddad
24f38f8646 Switch to preset-env (#1742)
* Switch to preset-env
Disables webpack modules by enabling babel modules to resolve #1638

* Bump babel-core to match babel preset versions

* Add uglify to targets
2017-03-06 20:21:28 -05:00
Joe Haddad
956322b76a Published branch 0.9.x
- create-react-app@1.3.0
 - eslint-config-react-app@0.6.1
 - react-dev-utils@0.5.2
 - react-scripts@0.9.4
2017-03-06 14:20:24 -05: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
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
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
Dan Abramov
2f7e3a2168 Lint internal scripts with eslint:recommended (#1729)
* Lint internal scripts with eslint:recommended

* Warnings r bad
2017-03-05 22:29:28 +00:00
Joe Haddad
df3ca8e614 Fix Node 4 e2e tests (#1730) 2017-03-05 22:29:18 +00:00
Bond
13f26e3288 Bump jsx-a11y version (#1542)
* Bump jsx-a11y version

* Update package dependecy for jsx-a11y

* Bump version in react-scripts
2017-03-05 19:35:24 +00:00
Chris Drackett
19a46724fb Add support for ignoreRestSiblings in no-unused-vars (#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
2017-03-05 14:54:33 +00:00
Ryan Platte
3fe828929f Update now.sh deployment instructions. (#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.
2017-03-05 14:44:35 +00:00
Ade Viankakrisna Fadlil
443ca23d55 Add docs for apache's client side routing setting (#1717)
* Add docs for apache's client side routing setting

* Tweak advice
2017-03-05 14:07:19 +00:00
pd4d10
72695a1c7c Remove unneeded url lib (#1715)
Remove unused `url` import in Webpack config
2017-03-04 13:31:12 +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
Simen Bekkhus
45d1d247df Update extract-text-webpack-plugin to latest (#1700) 2017-03-02 10:22:23 -05:00
Dan Abramov
404c354196 Suggest to use .env for enabling polling mode (#1698) 2017-03-02 12:29:44 +00:00
Myk Klemme
af6a0fffc1 Fixed missing flag in first preprocess command (#1687) 2017-03-01 01:41:09 -05:00