aboutsummaryrefslogtreecommitdiff
path: root/packages/kbn-plugin-helpers/tasks/build/create_build.js
diff options
context:
space:
mode:
authorKim Joar Bekkelund <kjbekkelund@gmail.com>2018-02-12 00:18:13 +0100
committerGitHub <noreply@github.com>2018-02-12 00:18:13 +0100
commit2220852a50647ce1cee06a3e6d8dd6632e0054c3 (patch)
tree755a50c1a244f0a291ed81b0690412e68779a63a /packages/kbn-plugin-helpers/tasks/build/create_build.js
parent61ca974c2eccdacc2e7d0b76d02ea38fa15cd383 (diff)
[plugin-helpers] npm -> yarn (#16632)
* [plugin-helpers] npm -> yarn * Allow globs to not match when singular, e.g. for 'yarn.lock' * --frozen-lockfile
Diffstat (limited to 'packages/kbn-plugin-helpers/tasks/build/create_build.js')
-rw-r--r--packages/kbn-plugin-helpers/tasks/build/create_build.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/packages/kbn-plugin-helpers/tasks/build/create_build.js b/packages/kbn-plugin-helpers/tasks/build/create_build.js
index aad1ec9e2..3ba73cee5 100644
--- a/packages/kbn-plugin-helpers/tasks/build/create_build.js
+++ b/packages/kbn-plugin-helpers/tasks/build/create_build.js
@@ -1,6 +1,5 @@
const join = require('path').join;
const relative = require('path').relative;
-const statSync = require('fs').statSync;
const execFileSync = require('child_process').execFileSync;
const del = require('del');
const vfs = require('vinyl-fs');
@@ -17,7 +16,7 @@ module.exports = function createBuild(plugin, buildTarget, buildVersion, kibanaV
.then(function () {
return new Promise(function (resolve, reject) {
vfs
- .src(files, { cwd: buildSource, base: buildSource })
+ .src(files, { cwd: buildSource, base: buildSource, allowEmpty: true })
// modify the package.json file
.pipe(rewritePackageJson(buildSource, buildVersion, kibanaVersion))
@@ -39,13 +38,6 @@ module.exports = function createBuild(plugin, buildTarget, buildVersion, kibanaV
stdio: ['ignore', 'ignore', 'pipe'],
};
- try {
- // use yarn if yarn lockfile is found in the build
- statSync(join(buildRoot, 'yarn.lock'));
- execFileSync(winCmd('yarn'), ['install', '--production'], options);
- } catch (e) {
- // use npm if there is no yarn lockfile in the build
- execFileSync(winCmd('npm'), ['install', '--production', '--no-bin-links'], options);
- }
+ execFileSync(winCmd('yarn'), ['install', '--production', '--frozen-lockfile'], options);
});
};