This repository has been archived by the owner on Jan 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simplify bin scripts and get them working
- Loading branch information
Showing
15 changed files
with
65 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
#!/usr/bin/env node | ||
|
||
var pkg = require('../package.json'); | ||
var program = require('commander'); | ||
var help = require('../help'); | ||
var task = require('../tasks/build'); | ||
require('../lib/command')('build', function (program) { | ||
|
||
program | ||
.version(pkg.version) | ||
.description('Build a distributable archive') | ||
.on('--help', help('build')) | ||
.parse(process.argv); | ||
program | ||
.description('Build a distributable archive'); | ||
|
||
|
||
task(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
#!/usr/bin/env node | ||
|
||
var program = require('commander'); | ||
require('../lib/command')('start', function (program) { | ||
|
||
var pkg = require('../package.json'); | ||
var help = require('../help'); | ||
var task = require('../tasks/start'); | ||
program | ||
.description('Start kibana and have it include this plugin'); | ||
|
||
program | ||
.version(pkg.version) | ||
.description('Start kibana and have it include this plugin') | ||
.on('--help', help('start')) | ||
.parse(process.argv); | ||
|
||
|
||
task(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
#!/usr/bin/env node | ||
|
||
var pkg = require('../package.json'); | ||
var program = require('commander'); | ||
var help = require('../help'); | ||
var task = require('../tasks/test:browser'); | ||
require('../lib/command')('test:browser', function (program) { | ||
|
||
program | ||
.version(pkg.version) | ||
.description('Run the browser tests in a real web browser') | ||
.on('--help', help('test:browser')) | ||
.parse(process.argv); | ||
program | ||
.description('Run the browser tests in a real web browser'); | ||
|
||
|
||
task(program); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
#!/usr/bin/env node | ||
|
||
var program = require('commander'); | ||
require('../lib/command')('test:server', function (program) { | ||
|
||
var pkg = require('../package.json'); | ||
var help = require('../help'); | ||
var task = require('../tasks/test:server'); | ||
program | ||
.description('Run the server tests using mocha'); | ||
|
||
program | ||
.version(pkg.version) | ||
.description('Run the server tests using mocha') | ||
.on('--help', help('test:server')) | ||
.parse(process.argv); | ||
|
||
task(); | ||
}); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env node | ||
|
||
module.exports = function (name, mod) { | ||
var pkg = require('../package.json'); | ||
var program = require('commander'); | ||
var docs = require('../docs'); | ||
var idPlugin = require('./id_plugin'); | ||
var task = require('../tasks/' + name); | ||
|
||
program | ||
.version(pkg.version) | ||
.on('--help', docs(name)); | ||
|
||
mod(program); | ||
|
||
program.parse(process.argv); | ||
|
||
task(idPlugin()); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var resolve = require('path').resolve; | ||
|
||
module.exports = function () { | ||
var root = process.cwd(); | ||
var pkg = require(resolve(root, 'package.json')); | ||
|
||
return { | ||
root: root, | ||
kibanaRoot: resolve(root, '../kibana'), | ||
id: pkg.name, | ||
pkg: pkg, | ||
version: pkg.version, | ||
config: (pkg.config && pkg.config.kibanaPluginHelpers) || {} | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
module.exports = function () { | ||
module.exports = function (plugin) { | ||
var resolve = require('path').resolve; | ||
var execFileSync = require('child_process').execFileSync; | ||
|
||
var pluginDir = resolve(__dirname, '..'); | ||
var kibanaDir = resolve(pluginDir, '../kibana'); | ||
var mochaSetupJs = resolve(kibanaDir, 'test/mocha_setup.js'); | ||
var mochaSetupJs = resolve(plugin.kibanaRoot, 'test/mocha_setup.js'); | ||
|
||
var cmd = 'mocha'; | ||
var args = ['--require', mochaSetupJs, 'server/**/__tests__/**/*.js']; | ||
execFileSync(cmd, args, { | ||
cwd: pluginDir, | ||
cwd: plugin.root, | ||
stdio: 'inherit' | ||
}); | ||
}; |