# weex-scripter

> Weex transformer

Latest version **0.1.6** (published 2018-02-07) · MIT license · 0 weekly downloads

## Install

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

## 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.1.6 |
| Published | 2018-02-07 |
| First published | 2016-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 20.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | songsiqi |
| Maintainers | hanks, songsiqi |
| Keywords | weex |

## Links

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

## Dependencies (5)

- [md5](https://npm.io/package/md5.md) ~2.1.0
- [esprima](https://npm.io/package/esprima.md) ~2.7.0
- [escodegen](https://npm.io/package/escodegen.md) ~1.7.1
- [browserify](https://npm.io/package/browserify.md) ~13.0.0
- [resolve-bin](https://npm.io/package/resolve-bin.md) ^0.4.0

## Recent versions

- 0.1.6 (latest) — 2018-02-07
- 0.1.5 — 2016-10-17
- 0.1.4 — 2016-04-19
- 0.1.3 — 2016-04-16
- 0.1.2 — 2016-04-08

## README

# Weex `<script>` Transformer

[![NPM version][npm-image]][npm-url]
[![Build status][circle-image]][circle-url]
[![Downloads][downloads-image]][downloads-url]

[npm-image]: https://img.shields.io/npm/v/weex-scripter.svg?style=flat-square
[npm-url]: https://npmjs.org/package/weex-scripter
[circle-image]: https://circleci.com/gh/weexteam/weex-scripter.svg?style=svg
[circle-url]: https://circleci.com/gh/weexteam/weex-scripter/tree/master
[downloads-image]: https://img.shields.io/npm/dm/weex-scripter.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/weex-scripter

transform JavaScript

## API

- `fix(code)`: automatically add `data: {function () {return {...}}}` to init component data from `data: {...}`
- `parseAndReplaceRequire(code)`: parse third party js required in `<script>`, return the modified code and collect requires
    * note that `require` is automatically changed to `browserifyRequire` because of the built-in `require` in `js-framework`
- `getBundle(requires)`: bundle all the third party js required in `<script>` by using `browserify`

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