webuild
1.0.0
工欲善其事, 必先利其器
特性:
process.env
, 預設有NODE_ENV
. 也可以自訂變數WEBUILD_XX
該專案為開發工具, 不是小程式框架.
安裝
npm install @axetroy/webuild -g
webuild init my-mini-app
cd my-mini-app
npm start
假設你的小程式專案目錄
.
├── app.css
├── app.js
├── app.json
└── pages
├── detail
│ ├── index.css
│ ├── index.js
│ └── index.xml
└── index
├── index.css
├── index.js
└── index.xml
建立src目錄,並且把小程式專案原始碼放在src目錄下, 並執行
# 运行命令, 监听文件变化并打包编译
webuild dev
# 发布项目
webuild build
原始碼src 已被編譯至dist 目錄.
開啟微信/支付寶開發者工具, 載入dist 目錄即可
需要關閉
ES6转ES5
選項
$ webuild --help
webuild 0.3.5 - 零配置无侵入式的微信小程序开发工具
USAGE
webuild < command > [options]
COMMANDS
init < name > 初始化一个新项目
dev 以开发模式运行
build 构建生产模式
help < command > Display help for a specific command
GLOBAL OPTIONS
-h, --help Display help
-V, --version Display version
--no-color Disable colors
--quiet Quiet mode - only displays warn and error messages
-v, --verbose Verbose mode - will also output debug messages
Contributing Guide
如果你覺得專案不錯,不要吝嗇你的star.
長期造輪子,歡迎follow.
Axetroy ? ? |
---|