【文件属性】:
文件名称:wxmini-to-vue:微信小程序页面(组件) 转 vue 组件
文件大小:200KB
文件格式:ZIP
更新时间:2021-05-23 20:57:41
JavaScript
小程序页面(组件)转Vue组件
:comet:一个微信小程序页面组件转为Vue组件的库
:zany_face: Installing
$ npm install wxmini-to-vue
:thinking_face: Example
const path = require('path')
// 导入 wxmini-to-vue
const WTV = require('wxmini-to-vue')
// 实例化
const wtv = new WTV()
// 入口路径
const entryPath = path.resolve(__dirname, './path')
// 存放位置
const outputPath = path.resolve(__dirname, './o/path')
// 执行转换
wtv.transform(entryPath, outputPath)
// 执行完成后会在 [outputPath] 中存放