var exec = require('child_process').exec;
var fs = require("fs");

//用这个生成所有的，最好把createModule里的warn去掉，否则子进程的打不到
const skinDataAll = JSON.parse(fs.readFileSync("./resource/skin.json"));
skinDataAll.children.forEach(c => {
    const cmd = "node ./scripts/createModule.js " + c.name;
    exec(cmd, { encoding: 'utf8' }, (e) => {
        console.log("生成模块：" + c.name)
    })
});
