app-creator

mtb app creator. (without yeoman)

Usage no npm install needed!

<script type="module">
  import appCreator from 'https://cdn.skypack.dev/app-creator';
</script>

README

App-Creator

NPM version Downloads

generator-mtb-app 的无依赖版。 不依赖yeoman.

Features

  • cli和module功能独立,module支持完整的功能,返回一个初始项目打包好的zip buffer。
  • 内网环境下支持最新版的flexible 方案直接集成到 src/index.html
  • 针对无法请求gitlab.alibaba-inc的环境做了良好容错。

Cli

$ npm install -g app-creator

$ appinit -h

  Usage: appinit [options]

  Options:

    -h, --help          output usage information
    -V, --version       output the version number
    -p, --proj [value]  Project Name
    -u, --user [value]  Git User or Project Author
    -t, --tool [value]  BuildTool you want use
    -c, --cssp [value]  Css Processor you want use
$ appinit

img

Api

//example

var Creator = require('app-creator');

var app = new Creator({
    projName: 'My-Proj',
    gitUser: 'gitUserName',
    buildTool: 'grunt',
    cssProcessor: 'less'
}, function (buffer) {
    // zip buffer
    fs.writeFile('app.zip', buffer);
});

ChangeLog