1.0.6 • Published 3 years ago
vue-app-compiler v1.0.6
intruduction
vue-app-compiler is a packer that packages vnode configuration, style and business logic scripts into a complete executable Vue application. It is developed based on vue.js and is an application layer extension based on vue-designer-online.
useage
- install it in your project
yarn add vue-app-compiler
or
npm install vue-app-compiler
use its build function to compile app
const {build} = require('vue-app-compiler') build({ vnodes: vnodes, views: views, methods: methods, model: model, css: css, outputPath: publicPath, success: function () { // compile success }, fail: function () { // compile fail } })
- vnodes:node data set of virtual DOM, data structure reference vnode of vue-desginer-online
- views: object data set of view layer, data structure reference view of vue-desginer-online
- methods:data set of functional script
- content: function body script string
- name: function name
- descript: function description
- type: function type, its aviriable value has 'callback','init','event','normal'
- model: data model objects, its a normal json object.
- css: css style sheet string
- outputPath: the output path of the compiled file
- success: the callback function when compile task has been completed Successfully
- fail: the callback function when compile task has been completed Unsuccessfully