Commit Graph

95 Commits

Author SHA1 Message Date
Jeffrey Posnick
eadfad28f4 Provide a no-op SW that will be served by the dev environment. (#2276)
* Provide a no-op SW that will be served by the dev environment.

* Hide no-op service worker from user
2017-05-20 19:07:43 +01:00
Dan Abramov
d76c1b78eb Wrap console calls into a check (#2290) 2017-05-20 19:06:48 +01:00
Dan Abramov
f3ff3f2473 Add missing license headers 2017-05-20 18:59:22 +01:00
Malcolm
d3e85364fe Add WSL support to launchEditor utility (#2282) 2017-05-20 17:52:58 +01:00
Jonathan
68cd59837e Fix missing dependency (#2269)
* Adding missing dependency

* Pinning text-table dependency
2017-05-19 22:57:11 +01:00
Dan Abramov
cd5c6d5717 Publish
- eslint-config-react-app@1.0.1
 - react-dev-utils@1.0.1
 - react-error-overlay@1.0.1
 - react-scripts@1.0.1
2017-05-19 20:22:12 +01:00
chyipin
1834cb5dbd Show customized build path for serve instruction (#2229)
* Show customized build path for serve instruction

* Remove cyan
2017-05-19 17:18:00 +01:00
Joe Haddad
70a7f28e2b Add explicit package dependence (#2243)
Closes #2232
2017-05-19 08:19:04 -04:00
Dan Abramov
6c8b18b0cd Improve interaction between compile and runtime overlays (#2219) 2017-05-18 23:07:56 +01:00
Dan Abramov
43b819c2bb "rule keywords" => "keywords" 2017-05-18 22:46:30 +01:00
Dan Abramov
55afd862c8 Move error overlay middleware (#2216) 2017-05-18 21:01:26 +01:00
Dan Abramov
07c75aa5fd Replace text-align: start with left to fix Edge (#2215) 2017-05-18 19:04:43 +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
Brian Vaughn
0681e24531 Tweaked error overlay styles (pt2) (#2208)
* Fixed several of the issues and nits from PR:

* Moved margin between header and file name to header, so when content was scrolled, the header would remain more separate
* Made build-time and runtime overlays better match
* Secondary error <pre> style now uses yellow bg instead of red
* 'Scrollable Header' (see above comment to why this is necessary) but I did increase the max-height from 35% to 50%.
* Fixed header and 'X' button vertical alignment

* Temporary stack margin fix

* Move "N errors" to the top
2017-05-18 12:25:43 +01:00
Dan Abramov
c82c4f0561 Refactor and improve build output (#2202) 2017-05-18 01:24:42 +01:00
Brian Vaughn
68f95d4133 Tweaking error overlay styles (#2201)
* Tweaked overlay styles

* Tweaked pre-style

* Clicked to background overlay dismiss

* Tidied up styles tobe more mobile Safari friendly

* Re-enabled pre-wrap

* Margin fixes

* Base font-size 10 -> 11px

* Error overlay is full-screen now based on feedback

* Make "N errors on the page" visible again

* Fix bottom margin of frame location and lack of tab nav

* Add tooltip to close button

* Bring compile error styles closer to runtime overlay

* s/when/if/
2017-05-18 00:48:33 +01:00
Joe Haddad
c27d765014 Test module scoping (#2198)
* Correct readme

* Add tests

* Update README.md
2017-05-17 14:52:55 -05:00
Dan Abramov
d9a2974574 Tidy up some build logs (#2197) 2017-05-17 20:10:17 +01:00
Joe Haddad
a61be9c619 Add module scope plugin (#2189)
* Add module scope plugin

* Oops

* Add comments

* Check windows seps too

* More descriptive error

* Document it
2017-05-17 12:19:52 +01:00
Dan Abramov
493e5a6996 Tweak lint rules (#2186) 2017-05-16 23:35:14 +01:00
Dan Abramov
46eeabca7e Tweak colors for better contrast on Windows (#2180) 2017-05-16 16:45:12 +01:00
Dan Abramov
58689133a1 Bump versions 2017-05-16 09:49:04 +01:00
Alison Monteiro
98fec2d543 react-dev-utils/openBrowser now supports urls with 2+ params (#2076)
* react-dev-utils/openBrowser now supports urls with 2+ params

Fixed #2047

* react-dev-utils/openBrowser: encode url before open the browser
2017-05-16 03:16:59 +01:00
Dan Abramov
0ffed85e6c Bump dependencies (#2170)
* Bump dependencies

* Bump CSS deps

* Somehow I missed dotenv

* Bump ESLint deps

* Tweak ESLint rules
2017-05-16 02:59:32 +01:00
Gabriel Aumala
8f028ae4b5 Support node scripts in BROWSER (#1590)
* Support node scripts in BROWSER

Modify OpenBrowser.js to run node scripts specified with the BROWSER environment
variable . If the value of the BROWSER environment variable ends with '.js' a
child process is spawned to execute the script with node.js. Any
arguments passed to npm start are also passed to this script, as well as
the url where the app is served.
The command executed in the child process is:

node <pathToScript> [OPTIONS] <url>

Update User Guide.

* Tweak code style

* Pin dep

* Comment out 0.10 docs
2017-05-16 00:25:04 +01:00
Joe Haddad
e17c392203 Fix lint 2017-05-15 13:48:44 -04:00
Dan Abramov
f87e61337a Make error/warning output more useful (#2161) 2017-05-15 18:09:05 +01:00
Joe Haddad
281e8d23f8 Add support for IPv6 hosts 2017-05-14 21:25:21 -04:00
James Blight
71a27c0f8b Allow custom proxies in development (#1790)
* Change proxy handling to allow multiple proxies to be specified in package.json.

* Up webpack-dev-server to 2.4.2

Webpack Dev Server version 2.4.2 handles the external websocket upgrade
for all proxies

* Fix the listen() call

* Switch to correct default host

* Remove promises and extract to react-dev-utils

* oops
2017-05-14 21:12:54 -04:00
Joe Haddad
9b228176f0 [Internal] Warn for missing brackets (#2151)
* Warn for missing braces

* Overlay, too
2017-05-14 20:59:20 -04:00
Joe Haddad
75fc094a5d Fix CI 2017-05-14 20:57:38 -04:00
Dan Abramov
5e35645b95 Focus on line in eslint messages 2017-05-15 01:15:58 +01:00
Dan Abramov
21349c542b Tweak error and warning output (#2152)
* Tweak error and warning output

* Add a colon
2017-05-15 01:07:59 +01:00
Joe Haddad
77087da361 Fix CI 2017-05-14 19:54:27 -04:00
Siddharth Doshi
f17448e9e5 Add custom eslint formatter (#2138)
* Add custom eslint formatter

* Add formatter docs

* Update formatter docs

* Slightly tweak it

* Update README.md
2017-05-15 00:42:13 +01:00
Dan Abramov
10c734b66a Print error messages for editor integration (#2150) 2017-05-14 23:52:27 +01:00
Ian Sutherland
82687dd224 Replace prompt function from react-dev-utils with Inquirer.js. (#1772) 2017-05-14 23:14:56 +01:00
Joe Haddad
be43292445 Temporarily fork detect-port (#2147)
* Temporarily fork detect-port

* Fix get process id

* Use different package

* Unnecessary var
2017-05-14 23:10:44 +01:00
Joe Haddad
dbd12f1452 Add a missing color mapping (#2146)
Closes #2127
2017-05-14 14:12:47 -04:00
Dan Abramov
4434467a43 Click to view source from error overlay (#2141)
* Click to view source

* Update package.json

* Update package.json

* Fix lint
2017-05-14 12:17:05 +01:00
Dan Abramov
1ede6a8d12 Only show first error (#2125) 2017-05-11 15:54:31 +01:00
Dan Abramov
69590775ce Omit ESLint warnings when there are ESLint errors (#2120) 2017-05-11 13:58:07 +01:00
Joe Haddad
70768b321e Add react-error-overlay package (#2111)
* ༼ つ ◕_◕ ༽つ stack-frame-overlay

* Fix linting

* Remove auto overlay

* Fix e2e

* Pull in the rest

* Appease flow

* Correct dep

* Remove old repo references

* Check flow on test

* Test overlay in e2e

* Add cross env

* Rename package

* Make sure it gets built post-install

* Update the README

* Remove extra builds now that there's a postinstall script

* Revert "Remove extra builds now that there's a postinstall script"

This reverts commit 8bf601dbd36c1e0da7f785fa9ade70ab08ed8772.

* Remove broken script

* Fix some dev ergo
2017-05-10 19:56:30 -04:00
Dan Abramov
0a503954b2 Prettify errors and warnings for Webpack 2 (#2113)
* Prettify errors and warnings for Webpack 2

* Update formatWebpackMessages.js
2017-05-10 21:49:37 +01:00
Ian Schmitz
f35593c12d Bump minimal Node version to 6 (#1897)
* Bump minimal Node version to 4.7.0

* Bump minimal Node version to 4.7.0

Modified additional files that needed a bump to 4.7.0 minimum node version

* Bump minimal Node version to 4.7.0

Reverse changes to packages/create-react-app/index.js as this file needs to continue to work on Node 0.10+

* Bump minimal node version to 6

* Bump minimal node version to 6

* Bump minimal node version to 6
2017-05-09 11:11:31 +01:00
Dan Abramov
2d7a1bb209 Minor tweaks for crash overlay (#2101) 2017-05-09 11:09:13 +01:00
Joe Haddad
d721d4a094 Modularize and extract crashOverlay to iframe (#1842)
* Modularize and extract crashOverlay to iframe

* Do not break words

* Disable warning overlay

* Use CJS imports
2017-04-24 22:03:32 -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
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
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