Commit Graph

34 Commits

Author SHA1 Message Date
Dave Ceddia
ce918191b2 Enable proxying of websockets (#1090)
Added `ws: true` to the httpProxyMiddleware options, and also listen
for the "upgrade" event so that websockets can be proxied immediately,
rather than waiting for an initial HTTP request.
2016-11-23 19:42:54 +00:00
Ian McNally
05c3b55c62 add logging of existing default port process on start (#816)
* add logging of existing port process on start

* Move port process wording in start command on to next line

* Color the named processes as cyan in terminal output

* Add handling for multiple processes on a part

- With the currently process filtering, if multiple processes are returned as running on port 3000, this command would fail. This splits apart the process IDing and the process naming, to support multiple processes.
- One curious thing about the bash command to get processes, is that it'll include browsers with a window open on localhost:3000. May want to reconsider that.

* Add process directory to existing port warning

- also moved terminal coloring up, when getting the process, to be able to distinguish the process command from the directory

* Change output color to all cyan, except "in"

* Rename getProcessNameOnPort -> getProcessForPort

- better reflects its broadened scope (both command and directory)

* Add checking if process is a CRA instance, to customize port running message

- moved from using package.json to a regex, for reliability

* Move getProcessForPort to react-dev-utils

- also allowed for breakdown of commands into helper methods

* Add documentation for getProcessForPort

* Add getProcessForPort to list of dev-scripts files

* Use app's package name when CRA app is running on another port

* Filter port process by those listening

- Removed the handling of multiple process IDs since you can filtering by listening process (and not have the browser in the list of processes)
- Trimmed the terminal outputs for better matching (process id) and better terminal output (directory of process)

* Update README on port helpers, to specify only one port returned

* Add ignore of stderr when executing process commands

- Make sure any potential errors don't leak to the user
2016-11-22 22:44:21 +02:00
Brian Ng
2da6edabab Replace rimraf with fs-extra functions (#1072) 2016-11-21 18:26:08 +00:00
Dan Abramov
ff7e22e5a8 Update GH deploy instructions to match User Guide 2016-11-20 18:13:09 +00:00
Nazim Hajidin
1668fb1948 Add missing --dev argument (#1058) 2016-11-20 15:30:12 +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
Alice Rose
7ce4b6e0e4 Check for presence of folders before continuing eject. Closes #939. (#951) 2016-10-28 13:54:56 +01:00
Fatih
ca443abe62 Enable compression on webpack-dev-server (#966) (#968) 2016-10-28 13:41:51 +01:00
Patrick Dillon
c6428eaff9 Exit production build if any errors are in build stats (#859)
* Exit on any errors passed in build stats

* Match console error output in start.js
2016-10-07 15:12:53 +01:00
Jan Potoms
feb6036fb2 Update instructions on publishing to GitHub pages (#841)
* Update instructions on publishing to GitHub pages

* Update README formatting
2016-10-04 15:34:41 +03:00
Dan Abramov
df21070ede Tweak eject output 2016-10-03 13:41:49 +01:00
Brian Ng
909d938166 Fix some typos (#809) 2016-10-01 12:13:42 +03: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
vaibhav
37819ee8ef added link to better visualizing tool (#764)
issue here #762
2016-09-26 14:06:46 +01: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
9cce0fb59f Add syntax error overlay in development (#744)
* Add syntax error overlay in development

* Support HMR being disabled

* Tweak CSS
2016-09-25 11:31:10 +01:00
Kasper Peulen
500fb749e0 simplify protocol === "https" ? true : false to protocol === "https" (#730) 2016-09-24 00:27:20 +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
ekaradon
fbccb820bb Add host as adjustable parameter through env variables (#717)
* Add host as adjustable parameter through env variables

eg: `HOST=test.dev.local npm start`

* Style nit
2016-09-23 15:01:35 +01:00
Dan Abramov
5b7a306cba Minor tweaks 2016-09-23 12:41:14 +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
Ayrton De Craene
8e5183ac1b Load environment file in development (#695)
* Load environment file via dotenv if .env file is present

* Document loading environment variables in .env file

* Minor doc tweaks
2016-09-23 11:59:38 +01:00
Aeneas
2050174631 openBrowser() causes docker-compose set ups to fail because of spawn EACCESS (#711)
* openBrowser() causes docker-compose set ups to fail because of spawn EACCESS - closes #710

Signed-off-by: Aeneas Rekkas (arekkas) <aeneas@ory.am>

* Ignore errors
2016-09-23 11:33:23 +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