// nodejs环境命令行构建:
var spawn = require("child_process").spawn;
spawn(cmd, args);
//cmd:/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/MacOS/CocosCreator
//args:[--path,./,--build,"platform=web-mobile;debug=false;md5Cache=true;sourceMaps=false;embedWebDebugger=true;"]
开始构建后,并没有把文件打包到build/web-mobile文件夹下,直接就把文件生成到了build下了
然后就开始报错
Build Failed: Error: TypeError: Cannot read property 'exportSimpleProject' of undefined
临时解决方案就是:在Creator内用构建面板打包一次,之后再用命令行就没问题了