Skip to content

merge #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 13, 2018
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ npm start

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.

### From `<2.16.0` to `>=2.16.0`

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).

### From `<2.13.0` to `>=2.13.0`

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.
Expand Down
6 changes: 3 additions & 3 deletions packages/react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ module.exports = {
// please link the files into your node_modules/ and let module-resolution kick in.
// Make sure your source files are compiled, as they will not be processed in any way.
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
new TsconfigPathsPlugin({ configFile: paths.appTsConfig }),
new TsconfigPathsPlugin({ configFile: paths.appTsProdConfig }),
],
},
module: {
Expand Down Expand Up @@ -183,7 +183,7 @@ module.exports = {
options: {
// disable type checker - we will use it in fork plugin
transpileOnly: true,
configFile: paths.appTsProdConfig
configFile: paths.appTsProdConfig,
},
},
],
Expand Down Expand Up @@ -333,7 +333,7 @@ module.exports = {
// Enable file caching
cache: true,
sourceMap: shouldUseSourceMap,
}), // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
}), // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
new ExtractTextPlugin({
filename: cssFilename,
}),
Expand Down
6 changes: 0 additions & 6 deletions packages/react-scripts/scripts/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,6 @@ inquirer
presets: ['react-app'],
};

// Add ESlint config
console.log(` Adding ${cyan('ESLint')} configuration`);
appPackage.eslintConfig = {
extends: 'react-app',
};

fs.writeFileSync(
path.join(appPath, 'package.json'),
JSON.stringify(appPackage, null, 2) + '\n'
Expand Down
4 changes: 0 additions & 4 deletions packages/react-scripts/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2217,9 +2217,6 @@ GitHub Pages doesn’t support routers that use the HTML5 `pushState` history AP
* 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.
* 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).

<<<<<<< HEAD
### Heroku
=======
#### Troubleshooting

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

### [Heroku](https://www.heroku.com/)
>>>>>>> dfbc71ce2ae07547a8544cce14a1a23fac99e071

Use the [Heroku Buildpack for Create React App](https://github.com/mars/create-react-app-buildpack).<br>
You can find instructions in [Deploying React with Zero Configuration](https://blog.heroku.com/deploying-react-with-zero-configuration).
Expand Down
3 changes: 2 additions & 1 deletion packages/react-scripts/template/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"linterOptions": {
"exclude": [
"config/**/*.js",
"node_modules/**/*.ts"
"node_modules/**/*.ts",
"coverage/lcov-report/*.js"
]
}
}
5 changes: 4 additions & 1 deletion tasks/e2e-kitchensink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ E2E_FILE=./build/index.html \
# ******************************************************************************

# Eject...
echo yes | npm run eject
echo yes | yarn eject

# Ensure all packages are installed properly.
yarn

# Link to test module
npm link "$temp_module_path/node_modules/test-integrity"
Expand Down