npm.io
0.2.1 • Published 9 years ago

generator-mina

Licence
MIT
Version
0.2.1
Deps
1
Vulns
0
Weekly
0
Stars
3

Generator-mina npm package

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

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.

License

MIT

Keywords