Skip to content

Commit 77ecd25

Browse files
authored
Merge branch 'master' into master
2 parents 062f34d + d07accb commit 77ecd25

File tree

14 files changed

+104
-58
lines changed

14 files changed

+104
-58
lines changed

appveyor.cleanup-cache.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Edit this file to trigger a cache rebuild.
2+
http://help.appveyor.com/discussions/questions/1310-delete-cache
3+
4+
----
5+
Just testing if this works.
6+
Hello, world.

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ environment:
1414
test_suite: "kitchensink"
1515

1616
cache:
17-
- node_modules
18-
- packages\react-scripts\node_modules
17+
- node_modules -> appveyor.cleanup-cache.txt
18+
- packages\react-scripts\node_modules -> appveyor.cleanup-cache.txt
1919

2020
clone_depth: 50
2121

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"devDependencies": {
1414
"babel-eslint": "7.1.0",
15-
"eslint": "3.8.1",
15+
"eslint": "3.16.1",
1616
"eslint-config-react-app": "0.5.1",
1717
"eslint-plugin-flowtype": "2.21.0",
1818
"eslint-plugin-import": "2.0.1",

packages/eslint-config-react-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If you want to use this ESLint configuration in a project not built with Create
1717
First, install this package, ESLint and the necessary plugins.
1818

1919
```sh
20-
npm install --save-dev eslint-config-react-app [email protected] eslint@3.8.1 [email protected] [email protected] [email protected] [email protected]
20+
npm install --save-dev eslint-config-react-app [email protected] eslint@3.16.1 [email protected] [email protected] [email protected] [email protected]
2121
```
2222

2323
Then create a file named `.eslintrc` with following contents in the root folder of your project:

packages/eslint-config-react-app/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ module.exports = {
134134
'no-unused-vars': ['warn', {
135135
vars: 'local',
136136
varsIgnorePattern: '^_',
137-
args: 'none'
137+
args: 'none',
138+
ignoreRestSiblings: true,
138139
}],
139140
'no-use-before-define': ['warn', 'nofunc'],
140141
'no-useless-computed-key': 'warn',

packages/eslint-config-react-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"peerDependencies": {
1414
"babel-eslint": "^7.0.0",
15-
"eslint": "^3.8.1",
15+
"eslint": "^3.16.1",
1616
"eslint-plugin-flowtype": "^2.21.0",
1717
"eslint-plugin-import": "^2.0.1",
1818
"eslint-plugin-jsx-a11y": "^2.2.3",

packages/react-dev-utils/openBrowser.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function openBrowser(url) {
1717
// Attempt to honor this environment variable.
1818
// It is specific to the operating system.
1919
// See https://github.com/sindresorhus/opn#app for documentation.
20-
const browser = process.env.BROWSER;
20+
let browser = process.env.BROWSER;
2121

2222
// Special case: BROWSER="none" will prevent opening completely.
2323
if (browser === 'none') {
@@ -50,6 +50,14 @@ function openBrowser(url) {
5050
}
5151
}
5252

53+
// Another special case: on OS X, check if BROWSER has been set to "open".
54+
// In this case, instead of passing `open` to `opn` (which won't work),
55+
// just ignore it (thus ensuring the intended behavior, i.e. opening the system browser):
56+
// https://github.com/facebookincubator/create-react-app/pull/1690#issuecomment-283518768
57+
if (process.platform === 'darwin' && browser === 'open') {
58+
browser = undefined;
59+
}
60+
5361
// Fallback to opn
5462
// (It will always open new tab)
5563
try {

packages/react-scripts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"css-loader": "0.26.1",
3838
"detect-port": "1.0.1",
3939
"dotenv": "2.0.0",
40-
"eslint": "3.8.1",
40+
"eslint": "3.16.1",
4141
"eslint-config-react-app": "^0.5.2",
4242
"eslint-loader": "1.6.3",
4343
"eslint-plugin-flowtype": "2.21.0",

packages/react-scripts/template/README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,17 @@ This is because when there is a fresh page load for a `/todos/42`, the server lo
12501250
});
12511251
```
12521252

1253+
If you’re using [Apache](https://httpd.apache.org/), you need to create a `.htaccess` file in the `public` folder that looks like this:
1254+
1255+
```
1256+
Options -MultiViews
1257+
RewriteEngine On
1258+
RewriteCond %{REQUEST_FILENAME} !-f
1259+
RewriteRule ^ index.html [QSA,L]
1260+
```
1261+
1262+
It will get copied to the `build` folder when you run `npm run build`.
1263+
12531264
Now requests to `/todos/42` will be handled correctly both in development and in production.
12541265

12551266
### Building for Relative Paths
@@ -1478,7 +1489,27 @@ When you build the project, Create React App will place the `public` folder cont
14781489
14791490
### Now
14801491
1481-
See [this example](https://github.com/xkawi/create-react-app-now) for a zero-configuration single-command deployment with [now](https://zeit.co/now).
1492+
[now](https://zeit.co/now) offers a zero-configuration single-command deployment.
1493+
1494+
1. Install the `now` command-line tool either via the recommended [desktop tool](https://zeit.co/download) or via node with `npm install -g now`.
1495+
1496+
2. Install `serve` by running `npm install --save serve`.
1497+
1498+
3. Add this line to `scripts` in `package.json`:
1499+
1500+
```
1501+
"now-start": "serve build/",
1502+
```
1503+
1504+
4. Run `now` from your project directory. You will see a **now.sh** URL in your output like this:
1505+
1506+
```
1507+
> Ready! https://your-project-dirname-tpspyhtdtk.now.sh (copied to clipboard)
1508+
```
1509+
1510+
Paste that URL into your browser when the build is complete, and you will see your deployed app.
1511+
1512+
Details are available in [this article.](https://zeit.co/blog/now-static)
14821513
14831514
### S3 and CloudFront
14841515

tasks/cra.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ root_path=$PWD
5252
# ******************************************************************************
5353

5454
# Install all our packages
55-
$root_path/node_modules/.bin/lerna bootstrap
55+
"$root_path"/node_modules/.bin/lerna bootstrap
5656

5757
cd packages/react-scripts
5858

@@ -61,10 +61,10 @@ cp package.json package.json.orig
6161

6262
# Replace own dependencies (those in the `packages` dir) with the local paths
6363
# of those packages.
64-
node $root_path/tasks/replace-own-deps.js
64+
node "$root_path"/tasks/replace-own-deps.js
6565

6666
# Finally, pack react-scripts
67-
scripts_path=$root_path/packages/react-scripts/`npm pack`
67+
scripts_path="$root_path"/packages/react-scripts/`npm pack`
6868

6969
# Restore package.json
7070
rm package.json
@@ -79,8 +79,8 @@ mv package.json.orig package.json
7979
yarn cache clean || true
8080

8181
# Go back to the root directory and run the command from here
82-
cd $root_path
83-
node packages/create-react-app/index.js --scripts-version=$scripts_path "$@"
82+
cd "$root_path"
83+
node packages/create-react-app/index.js --scripts-version="$scripts_path" "$@"
8484

8585
# Cleanup
8686
cleanup

0 commit comments

Comments
 (0)