# weex-builder

> [![Build Status](https://travis-ci.org/weexteam/weex-builder.svg?branch=master)](https://travis-ci.org/weexteam/weex-builder) [![dependcy](https://david-dm.org/weexteam/weex-builder.svg)](https://david-dm.org/weexteam/weex-builder) [![dev dependcy](https:

Latest version **0.4.1** (published 2018-08-21) · 0 weekly downloads

## Install

```sh
npm install weex-builder
pnpm add weex-builder
yarn add weex-builder
bun add weex-builder
```

Provides the command `weex-builder`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2018-08-21 |
| First published | 2017-01-09 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 21 |
| Unpacked size | 283.5 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 13 |
| Author | weex team |
| Maintainers | erha19, exolution, parryworld, tancy |
| Keywords | weex, build, weexteam, compile |

## Links

- npm: https://www.npmjs.com/package/weex-builder
- Repository: https://github.com/weexteam/weex-builder
- Homepage: https://github.com/weexteam/weex-builder#readme
- Issues: https://github.com/weexteam/weex-builder/issues
- npm.io page: https://npm.io/package/weex-builder

## Dependencies (21)

- [css](https://npm.io/package/css.md) ^2.2.1
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [cliui](https://npm.io/package/cliui.md) ^3.2.0
- [gauge](https://npm.io/package/gauge.md) ^2.7.2
- [shelljs](https://npm.io/package/shelljs.md) ^0.7.8
- [sourcer](https://npm.io/package/sourcer.md) ^0.1.4
- [webpack](https://npm.io/package/webpack.md) ^3.10.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^5.0.0
- [commander](https://npm.io/package/commander.md) ^2.9.0
- [css-loader](https://npm.io/package/css-loader.md) ^0.28.7
- [vue-loader](https://npm.io/package/vue-loader.md) ^12.2.2
- [weex-loader](https://npm.io/package/weex-loader.md) ^0.7.2
- [weex-styler](https://npm.io/package/weex-styler.md) ^0.2.6
- [babel-loader](https://npm.io/package/babel-loader.md) ^7.1.2
- [style-loader](https://npm.io/package/style-loader.md) ^0.19.0
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.9.2
- [webpack-merge](https://npm.io/package/webpack-merge.md) ^4.1.2
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.26.0
- [vue-style-loader](https://npm.io/package/vue-style-loader.md) ^3.0.3
- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) ^6.9.0
- [babel-preset-stage-0](https://npm.io/package/babel-preset-stage-0.md) ^6.24.1

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.4.1 (latest) — 2018-08-21
- 0.3.1-8.youku.2 (youku) — 2018-12-26
- 0.4.0 — 2018-04-25
- 0.3.1-8.youku — 2018-04-18
- 0.3.19 — 2018-04-11
- 0.3.18 — 2018-03-21
- 0.3.17 — 2018-03-12
- 0.3.16 — 2018-02-26
- 0.3.15 — 2018-02-08
- 0.3.14 — 2018-02-04
- 0.3.13 — 2018-02-04
- 0.3.12 — 2018-01-18
- 0.3.11-beta.1 — 2018-01-17
- 0.3.11 — 2018-01-17
- 0.3.10 — 2018-01-16
- … 52 more at https://npm.io/package/weex-builder/versions

## README

# weex-builder

[![Build Status](https://travis-ci.org/weexteam/weex-builder.svg?branch=master)](https://travis-ci.org/weexteam/weex-builder)
[![dependcy](https://david-dm.org/weexteam/weex-builder.svg)](https://david-dm.org/weexteam/weex-builder)
[![dev dependcy](https://david-dm.org/weexteam/weex-builder/dev-status.svg)](https://david-dm.org/weexteam/weex-builder?type=dev)

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

## usage

`$ npm install -g weex-builder`

>we suggest you use [weex-toolkit](https://github.com/weexteam/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
```

2. compile all vue files in directory `path/to/src` and output to `path/to/dist`
```
weex-builder path/to/src/\*.vue path/to.dist
```


3. 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

---
_Source: https://npm.io/package/weex-builder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
