0.2.1 • Published 7 years ago
generator-mina v0.2.1
Generator-mina
It's only personal project, not official way to build weapp. Please use with caution.
A simple generator for MINA with gulp, async/await support.
Installation
Prerequisites: Node.js and Yeoman.
$ npm i -g yo generator-mina
Usage
- Generate mina template.
$ mkdir <project-name> && cd <project-name>
$ yo mina
Example:
$ mkdir hello-mina && cd hello-mina
$ yo mina
- Install node_modules.
$ npm i
- Run scripts.
build
for building,dev
for watching
$ npm run build
$ npm run dev
Use 微信web开发者工具 to open
hello-mina/dist
.await/async usage
You need require assets/runtime.js
first when you want to use async. see the example in src/utils/login.js
const regeneratorRuntime = require('asstes/runtime.js')
Caution
Weapp is running on JsCore, so not all package can be used. It's not official way, please use with caution.