weex-builder

0.4.1 • Public • Published

weex-builder

Build Status dependcy dev dependcy

a weex compiler tool used by weex-toolkit (bind on "weex compile")

usage

$ npm install -g weex-builder

we suggest you use weex-toolkit

CLI

command

  1. compile all files in directory path/to/src and output to path/to/dist
weex-builder path/to/src  path/to/dist
  1. compile all vue files in directory path/to/src and output to path/to/dist
weex-builder path/to/src/\*.vue path/to.dist
  1. compile all vue/we files but except index.we in directory path/to/src and output to path/to/dist
weex-builder path/to/src/\*.vue,\*.we,^index.we path/to.dist

options

    -h, --help           output usage information
    -v,--version         show version
    --ext [ext]          set enabled extname for compiler default is vue|we
    --web                set web mode for h5 render
    -w,--watch           watch files and rebuild
    --devtool [devtool]  set webpack devtool mode
    --min                compress the output js (will disable inline-source-map)
    --filename           set filename template of webpack, like `[name].web.js`

Node

const weexBuilder = require('weex-builder');
const source = 'src';
const dest = 'dest';

weexBuilder(source, dest, {
    recursive, true
}, (err, output, json) => {
    if (err) {
        console.log(chalk.red('Build Failed!'))
        err.forEach(e => console.error(e))
    }
    else {
        console.log('Build completed!\nChild')
        console.log(output.toString())
    }
})

Lisence

MIT

Package Sidebar

Install

npm i weex-builder

Weekly Downloads

37

Version

0.4.1

License

none

Unpacked Size

290 kB

Total Files

12

Last publish

Collaborators

  • erha19
  • exolution
  • parryworld
  • tancy