Running main, corrected build, checking for no dependencies (elastic/kibana-plugin-helpers#15)

* Updated if check if there are no dependencies

* Now running main()

* Build now uses the correct parameter.

Original commit: elastic/kibana-plugin-helpers@7cf31d26d2
This commit is contained in:
Chris Weed 2016-11-17 03:47:45 -06:00 committed by Spencer
parent 0eec010617
commit 9eff54d1e0

View file

@ -43,7 +43,7 @@ module.exports = function (plugin) {
} }
} }
function build(deps, kibanaVersion) { function build(buildId, deps, kibanaVersion) {
var files = [ var files = [
'package.json', 'package.json',
'index.js', 'index.js',
@ -52,7 +52,7 @@ module.exports = function (plugin) {
if (deps.length === 1) { if (deps.length === 1) {
files.push(`node_modules/${ deps[0] }/**/*`); files.push(`node_modules/${ deps[0] }/**/*`);
} else { } else if(deps.length) {
files.push(`node_modules/{${ deps.join(',') }}/**/*`); files.push(`node_modules/{${ deps.join(',') }}/**/*`);
} }
@ -80,4 +80,6 @@ module.exports = function (plugin) {
.pipe(zip(`${buildId}.zip`)) .pipe(zip(`${buildId}.zip`))
.pipe(vfs.dest(join(plugin.root, 'build'))); .pipe(vfs.dest(join(plugin.root, 'build')));
} }
main();
}; };