提交 d7b1e062 编写于 作者: NoSubject's avatar NoSubject

修改打包文件支持vue和react类型的component组件

上级 3c897fb5
......@@ -348,7 +348,7 @@ async function build_web_module() {
var pkgPath = path.resolve(srcPath, p, 'package.json');
if (fs.existsSync(pkgPath)){
var pkg = require(pkgPath);
if (pkg.scripts['o2-deploy']){
if (pkg.scripts['o2-build']){
moduleFolder.push(file);
}
}
......@@ -360,7 +360,7 @@ async function build_web_module() {
// var tasks = [];
moduleFolder.forEach((f)=>{
shelljs.config.verbose = true;
shelljs.exec('npm run o2-deploy -- --dest ../../../'+dest+f, {cwd: path.resolve(srcPath, f)});
shelljs.exec('npm run o2-build', {cwd: path.resolve(srcPath, f)});
});
});
});
......
......@@ -83,7 +83,7 @@ function createDefaultTask(path, isMin, thisOptions) {
if (fs.existsSync(pkgPath)){
var pkg = require(pkgPath);
if (pkg.scripts['o2-deploy']){
gulp.task(path, gulp.series(shell.task('npm run o2-deploy -- --dest ../../dest/'+path, {cwd: nodePath.resolve('source', path), verbose:true}), function(cb){
gulp.task(path, gulp.series(shell.task('npm run o2-deploy', {cwd: nodePath.resolve('source', path), verbose:true}), function(cb){
var option = thisOptions || options;
var dest = ['dest/' + path + '/**/*'];
return gulp.src(dest)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册