English | 简体中文
🐒Configurable build tool for React project based on webpack. Find detailed instructions in its documentation
ice-scripts
have everything you need to build a React app:
- Fully configurable via
ice.config.js
, allow your project to have it's configuration - The plugin system provides rich features and allow the community to build reusable solutions
- Out of the box support for ES6+, TypeScripts, Less, Sass, CSS Modules
- Easy to modify built-in webpack configuration by webpack-chain
- Delightful JavaScript testing based on Jest
Recommend to create a React app via iceworks
# Install deps
$ npm install iceworks -g
# create an empty folder
$ mkdir iceapp && cd iceapp
# create react project
$ iceworks init
# install dependencies
$ npm install
Once the initialization is done, inside the created project, you can run some built-in commands:
$ npm start
Runs the app in development mode.
It will open http://localhost:4444
for preview. The page will be automatically reloaded if you make changes to the code.
$ npm run build
Builds the app for prodution.
Out of the box, ice-scripts
won't require you to use a configuration file. If you need to customize your project config, you can create a ice.config.js
file in the root folder and ice-scripts
will automatically use it.
ice.config.js
const path = require('path');
module.exports = {
// basic options. see https://ice.work/docs/cli/config/config for more infomation
entry: 'src/index.js',
publicPath: './',
alias: {
'@components': path.resolve(__dirname, 'src/components/')
},
// ...
// see https://ice.work/docs/cli/plugin-list/fusion for more infomation
plugins: [
['ice-plugins-fusion', { themePackage: '@icedesign/theme' }],
],
// modify webpack configuration via webpack-chain
chainWebpack: (config) => {
config.devServer.hot(true);
}
}
Feel free to report any questions as an issue, we'd love to have your helping hand on ice-scripts
.
If you're interested in ice-scripts
, see CONTRIBUTING.md for more information to learn how to get started.