diff --git a/.travis.yml b/.travis.yml index a21cb13d..ae4aec76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,8 @@ before_install: script: - scripts/build-native.js - - npm run build + - npm run build --prefix app + - node scripts/build-plugins.js - scripts/prepackage-plugins.js - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then scripts/build-linux.js; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then scripts/build-macos.js; fi diff --git a/appveyor.yml b/appveyor.yml index 09a37719..0df99258 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,7 +24,8 @@ install: - node scripts/build-native.js build_script: - - npm run build + - npm run build --prefix app + - node scripts/build-plugins.js - node scripts/prepackage-plugins.js - node scripts/build-windows.js diff --git a/scripts/build-plugins.js b/scripts/build-plugins.js new file mode 100755 index 00000000..3bfc0a91 --- /dev/null +++ b/scripts/build-plugins.js @@ -0,0 +1,11 @@ +#!/usr/bin/env node +const sh = require('shelljs') +const vars = require('./vars') +const log = require('npmlog') + +vars.builtinPlugins.forEach(plugin => { + log.info('build', plugin) + sh.cd(plugin) + sh.exec(`npm run build`) + sh.cd('..') +}) diff --git a/scripts/install-deps.js b/scripts/install-deps.js index 8291250b..2913b73c 100755 --- a/scripts/install-deps.js +++ b/scripts/install-deps.js @@ -6,12 +6,10 @@ const log = require('npmlog') log.info('deps', 'app') sh.exec('npm prune') -sh.exec('npm install') sh.exec('npm update --dev') sh.cd('app') sh.exec('npm prune') -sh.exec('npm install') sh.exec('npm update --dev') sh.cd('..') @@ -19,7 +17,6 @@ vars.builtinPlugins.forEach(plugin => { log.info('deps', plugin) sh.cd(plugin) sh.exec('npm prune') - sh.exec('npm install') sh.exec('npm update --dev') sh.cd('..') })