0.4.5 • Published 6 years ago
@espkg/mina2vue v0.4.5
mina2vue
Convert native wxml, wxss eg. to .vue files
Functions
There are four main functions needed to successfully convert one page to vue.
jsConverterconverts *.js to vue-friendly js.wxmlConverterconverts *.wxml to vue template syntaxwxssConverterconverts *.wxss to vue stylesheet (CSS) syntaxvueGeneratorcombines the three things above into a vue file's content.
| fn | input | output |
|---|---|---|
| jsConverter | sourceCode(string), options({ type: 'page' }) | script distCode(string) |
| wxmlConverter | sourceCode(string), options({}) | template distCode(string) |
| wxssConverter | sourceCode(string), options({}) | style distCode(string) |
| vueGenerator | template(wxmlConverter distCode), style(wxssConverter distCode), scripts(jsConverter distCode) | vue distCode(string) |