This commit is contained in:
niunai
2016-12-27 20:11:05 +08:00
commit 900b5d7063
16 changed files with 536 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
'use strict';
const components = require('../../components.json');
const execSync = require('child_process').execSync;
const existsSync = require('fs').existsSync;
const path = require('path');
let componentPaths = [];
delete components.font;
Object.keys(components).forEach(key => {
const filePath = path.join(__dirname, `../../packages/${key}/cooking.conf.js`);
if (existsSync(filePath)) {
componentPaths.push(`packages/${key}/cooking.conf.js`);
}
});
const paths = componentPaths.join(',');
const cli = `node_modules/.bin/cooking build -c ${paths} -p`;
execSync(cli, {
stdio: 'inherit'
});