1.0.0-beta.1 • Published 6 years ago

@linhun/jane v1.0.0-beta.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

jane

cover

  • scss、less、async、await、api的promise化处理

Install

sudo npm install -g @linhun/jane

Features

  • .scss -> .wxss
  • es6 -> es5, support #sourcemap
  • async、await
  • support build -w, scss dependence chk

Quickstart

init project

jane new project

build project

jane build // on production
jane build -w // watch build on develop

config file

module.exports = {
  dest:'build', // build dir
  tpl:{ // custom page dir
    page:'' // must be directory
  },
  css: {
    ext:'.scss', // css ext
    compiler: 'scss', // define css compiler
    config:{} // css compile by node-sass. option is same as:https://github.com/sass/node-sass
  },
  js: {
    ext:'.js',
    compiler: 'babel',
    // https://babeljs.io/docs/usage/api/
    config: {
      presets:['env'],
      plugins:["transform-async-to-generator"] // babel-plugins 
    }
  },
  ignore:['node_modules','dist','.DB_store','.DS_Store'] // these files could be ignored by compiler
}

More usage

jane --help

  Usage: jane [options] [command]
  
  Options:

    -v, --version  显示版本号
    -w, --watch    监视目录改动
    -h, --help     output usage information


  Commands:

    clean          清空build目录
    build          编译项目
    new <project>  新建项目
    page <page>    新建页面
    upgrade        更新

Todo

  • image minify

License

MIT

1.0.0-beta.1

6 years ago

1.0.0-alpha.2

6 years ago

1.0.0-alpha.1

6 years ago

1.0.0

6 years ago