Skip to content

Commit a651e4f

Browse files
authored
Merge pull request #1 from wmonk/master
merge
2 parents f1e5c22 + e4b1f94 commit a651e4f

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ npm start
2121

2222
In general, most upgrades won't require any migration steps to work, but if you experience problems after an upgrade, please file an issue, and we'll add it to the list of migration steps below.
2323

24+
### From `<2.16.0` to `>=2.16.0`
25+
26+
Since `2.16.0`, the template uses different `tsconfig` files for both development and production mode. For the latter, unfortunately, the path resolver is not smart enough to fall back to the basic `tsconfig.json` in case the expected `tsconfig.prod.json` is not present, so you have to create this file manually like shown [here](https://github.com/wmonk/create-react-app-typescript/blob/master/packages/react-scripts/template/tsconfig.prod.json).
27+
2428
### From `<2.13.0` to `>=2.13.0`
2529

2630
Since `2.13.0`, `typescript` is listed as a peer dependency of `react-scripts-ts`. For projects generated with at least this version, the init script takes care of properly installing it as dev dependency to the generated projects. Older projects require manual installation, in case you have not already done that.

Diff for: packages/react-scripts/config/webpack.config.prod.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module.exports = {
131131
// please link the files into your node_modules/ and let module-resolution kick in.
132132
// Make sure your source files are compiled, as they will not be processed in any way.
133133
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
134-
new TsconfigPathsPlugin({ configFile: paths.appTsConfig }),
134+
new TsconfigPathsPlugin({ configFile: paths.appTsProdConfig }),
135135
],
136136
},
137137
module: {
@@ -183,7 +183,7 @@ module.exports = {
183183
options: {
184184
// disable type checker - we will use it in fork plugin
185185
transpileOnly: true,
186-
configFile: paths.appTsProdConfig
186+
configFile: paths.appTsProdConfig,
187187
},
188188
},
189189
],
@@ -333,7 +333,7 @@ module.exports = {
333333
// Enable file caching
334334
cache: true,
335335
sourceMap: shouldUseSourceMap,
336-
}), // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
336+
}), // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
337337
new ExtractTextPlugin({
338338
filename: cssFilename,
339339
}),

Diff for: packages/react-scripts/scripts/eject.js

-6
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,6 @@ inquirer
208208
presets: ['react-app'],
209209
};
210210

211-
// Add ESlint config
212-
console.log(` Adding ${cyan('ESLint')} configuration`);
213-
appPackage.eslintConfig = {
214-
extends: 'react-app',
215-
};
216-
217211
fs.writeFileSync(
218212
path.join(appPath, 'package.json'),
219213
JSON.stringify(appPackage, null, 2) + '\n'

Diff for: packages/react-scripts/template/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -2217,9 +2217,6 @@ GitHub Pages doesn’t support routers that use the HTML5 `pushState` history AP
22172217
* You could switch from using HTML5 history API to routing with hashes. If you use React Router, you can switch to `hashHistory` for this effect, but the URL will be longer and more verbose (for example, `http://user.github.io/todomvc/#/todos/42?_k=yknaj`). [Read more](https://reacttraining.com/react-router/web/api/Router) about different history implementations in React Router.
22182218
* Alternatively, you can use a trick to teach GitHub Pages to handle 404 by redirecting to your `index.html` page with a special redirect parameter. You would need to add a `404.html` file with the redirection code to the `build` folder before deploying your project, and you’ll need to add code handling the redirect parameter to `index.html`. You can find a detailed explanation of this technique [in this guide](https://github.com/rafrex/spa-github-pages).
22192219

2220-
<<<<<<< HEAD
2221-
### Heroku
2222-
=======
22232220
#### Troubleshooting
22242221

22252222
##### "/dev/tty: No such a device or address"
@@ -2231,7 +2228,6 @@ If, when deploying, you get `/dev/tty: No such a device or address` or a similar
22312228
3. Try `npm run deploy again`
22322229

22332230
### [Heroku](https://www.heroku.com/)
2234-
>>>>>>> dfbc71ce2ae07547a8544cce14a1a23fac99e071
22352231

22362232
Use the [Heroku Buildpack for Create React App](https://github.com/mars/create-react-app-buildpack).<br>
22372233
You can find instructions in [Deploying React with Zero Configuration](https://blog.heroku.com/deploying-react-with-zero-configuration).

Diff for: packages/react-scripts/template/tslint.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"linterOptions": {
44
"exclude": [
55
"config/**/*.js",
6-
"node_modules/**/*.ts"
6+
"node_modules/**/*.ts",
7+
"coverage/lcov-report/*.js"
78
]
89
}
910
}

Diff for: tasks/e2e-kitchensink.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ E2E_FILE=./build/index.html \
160160
# ******************************************************************************
161161

162162
# Eject...
163-
echo yes | npm run eject
163+
echo yes | yarn eject
164+
165+
# Ensure all packages are installed properly.
166+
yarn
164167

165168
# Link to test module
166169
npm link "$temp_module_path/node_modules/test-integrity"

0 commit comments

Comments
 (0)