starter-scripts v3.4.4
starter-scripts
A custom fork of react-scripts
. This package includes scripts and configuration used by Create React App. Please refer to its documentation:
- User Guide – How to develop apps bootstrapped with Create React App.
Getting Started
Create an App
$ yarn create react-app --scripts-version starter-scripts my-app
or update an existing project, install starter-scripts.
$ yarn add starter-scripts
Next, replace react-scripts with starter-scripts in package.json
.
{
"scripts": {
"start": "starter-scripts start",
"build": "starter-scripts build",
"test": "starter-scripts test",
"eject": "starter-scripts eject"
}
}
If you created project with typescript template, replace types="react-scripts" />
with types="starter-scripts"
in react-app-env.d.ts
.
/// <reference types="starter-scripts" />
Why use starter-scripts
instead of react-scripts
?
Enjoy a custom attribute
styleName
make you combine react and css-module in a concise way. (see more on react-css-modules)// component.jsx import './hello.module.css' <span styleName='bar'>World</span> // "bar" is a class name defined in `hello.module.css` and do not pollute any other class.
Enjoy your custom css plugins. Install all required postcss plugins and add
postcss.config.js
in the project root.// postcss.config.js module.exports = { plugins: { 'postcss-plugin': {}, }, };
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago