UNPKG

magix-combine

Version:

合并Magix View的html,js,css成一个js文件,并检测html,js,css中可能存在的问题

15 lines (14 loc) 412 B
let autoprefixer = require('autoprefixer'); let postcss = require('postcss'); let configs = require('./util-config'); module.exports = css => { return new Promise((resolve, reject) => { postcss(autoprefixer(configs.autoprefixer)).process(css, { from: undefined }).then(res => { resolve(res.css); }).catch(ex => { reject(ex); }); }); };