快速开始 —— 使用 steamerjs 安装与更新脚手架
安装 steamerjs 和脚手架管理插件
npm i -g steamerjs// v2.0 之后已经内置,可不额外安装npm i -g steamer-plugin-kit
安装你喜欢的脚手架
steamer kit --add https://github.com/steamerjs/steamer-react.git
本地部署脚手架
steamer kit// 然后选择你喜欢的脚手架? Which starterkit do you wanna install: (Use arrow keys)❯ steamer-react - alloyteam react starterkitsteamer-vue - alloyteam vue starterkitsteamer-simple - alloyteam frameworkless starterkitsteamer-react-component - react component development starter kitsteamer-vue-component - vue component development starter kitsteamer-simple-component - frameless component development starter kitsteamer-logic-component - logic component development starterkitsteamer-example - steamer starter kit example
脚手架自身命令
// 安装依赖npm i// 开发npm start 或 npm run dev// 打开链接localhost:9000// 代码规范扫描npm lint// 生产代码生成npm run dist 或 npm run pub
基于模板生成页面
steamer kit --template// 然后选择你想选的模板,进行页面生成? type the template source folder: ./tools/template? type your template destination folder: ./src/page? type your npm command(npm|tnpm|cnpm etc): npmwhich template do you like: (Use arrow keys)❯ indexlistpreact-listspa? type in your page name: detail
更新脚手架
// 更新脚手架steamer kit --update --global// 更新你的项目构建cd project // 进入项目目录steamer kit --update
更新完毕,为将 tools,package.json README.md 做备份,其它内容会进行覆盖。
