Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

Latest commit

 

History

History
21 lines (16 loc) · 1.05 KB

File metadata and controls

21 lines (16 loc) · 1.05 KB

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