Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

weex-scripter

weexteam270MIT0.1.6

Weex <script> transformer

weex

readme

Weex <script> Transformer

NPM version Build status Downloads

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