@100tal-seg/seg-react
v0.0.2
Published
SEG SDK
Downloads
6
Readme
seg-react
A cli tool for React Development. Docs.
Install
$ npm install seg-react -g
$ sr --help
Cli
Recommended
$ mkdir ice-project
$ cd ice-project
$ sr init project # also support component/block
$ sr dev
$ sr build
$ sr add block
Methods
Not recommended
init({ scaffold })
init project by scaffold:
const { init } = require('seg-react');
await init({
template: '@icedesign/lite-scaffold',
// Default: process.cwd()
projectDir: ''
// component/block/project, Default: project
type: ''
});
build({ customWebpackConfig, cliOptions })
build project:
const { build } = require('seg-react');
await build({
customWebpackConfig: {},
// ref to bin/ice-build.js
cliOptions: {}
});