seapp builder
360 小程序构建工具,用于构建开发者基于360小程序开发文档编写的源代码,使其能够运行在360小程序平台
TIP
v1.0.0
- 支持 css 预处理器 Sass/Less
- 默认支持的预处理器由 全局样式表app.css决定(app.scss -> 选用sass,less同理)
- 存在 app.css/app.less/app.scss 时, 优先选择权 app.scss > app.less > app.css
ENV
- node >= 8.9
- npm | yarn
- 以下使用 npx 时要求 npm >= 5.2
Install
npm install @qihoo/seapp-builder
Usage
在 360mp 项目下使用
Usage: builder <command> [options]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
build build project in production mode
watch build project in development mode and watch file
Run builder <command> --help for detailed usage of given command.
在 package.json 中配置使用
{
"scripts": {
"serve": "builder watch",
"build": "builder build"
}
}
通过 npx | yarn 使用
npx builder watch
npx builder build
- 已按照上述步骤在 package.json 中添加了 scripts
# 可以监听项目文件 实时构建
npm run serve
# 构建生产环境目标文件
npm run build