瀏覽代碼

build repos fix

pull/4/head
samuel 3 年之前
父節點
當前提交
5b03a00bd3
共有 1 個檔案被更改,包括 25 行新增9 行删除
  1. 25
    9
      index.js

+ 25
- 9
index.js 查看文件

@@ -828,6 +828,19 @@ var __runcmd = function(label){
, 'npmi' : ()=>{
var tasks = [];
var bowerRepos = ['client']

var npmbuildrepos = ['loopback-jsonapi-model-serializer']
npmbuildrepos.forEach(repo => {
tasks.push(()=>{
var p = nodeShellExec('npm', ['run build'], {
inherit : true, shell: true
, cwd : repo
, env: process.env
, title : `bower i for ${repo}`
}).catch((e)=>{ console.error(e) })
return p;
})
})
bowerRepos.forEach(repo => {
tasks.push(()=>{
var p = nodeShellExec('bower', ['install'], {
@@ -856,15 +869,18 @@ var __runcmd = function(label){
, env: process.env
, title : `rm 'package-lock.json' for ${repo}`
}).catch((e)=>{ console.error(e) })
tasks.push(()=>{
var p = nodeShellExec('npm', ['i'], {
inherit : true, shell: true
, cwd : repo
, env: process.env
, title : `npm i for ${repo}`
}).catch((e)=>{ console.error(e) })
return p;
})

if( npmbuildrepos.indexOf(repo) != -1) {
tasks.push(()=>{
var p = nodeShellExec('npm', ['i --force'], {
inherit : true, shell: true
, cwd : repo
, env: process.env
, title : `npm i for ${repo}`
}).catch((e)=>{ console.error(e) })
return p;
})
}
})
any(tasks);

Loading…
取消
儲存