@vision-dev/vision-builder
v0.0.2-alpha.0
Published
Dynamic builder for vision
Downloads
1
Readme
vision-builder
解析页面拼装协议使用 webpack 动态构建出前端产物的构建器
Usage
MpBuilder
import { MpBuilder } from '@tencent/vision-builder';
const mpBuilder = new MpBuilder({
buildType: 'preview',
activity: {
act_key: 'debug',
dataValues: {
act_id: '0',
act_name: 'debug',
act_description: 'debug',
act_key: 'debug',
act_start_time: Date.now(),
act_end_time: Date.now(),
act_is_base: 0,
},
},
container: '',
historyContent: {}, // 页面描述 schema
historyExt: {},
paths: {
tempPath: '', // workspace 存放目录
libName: '',
},
libFramework: 'react',
buildInLibrary: true,
mpProjectDir: '/absolute_path/to/vision/compile/mp', // 小程序工程目录
});
const { subPackagePath, pagePath } = mpBuilder.build();