This repository was archived by the owner on Mar 31, 2024. It is now read-only.
forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
building is mostly stable, less is improving, initial cached building…
… added
- Loading branch information
Spencer Alger
committed
Jul 7, 2015
1 parent
935bb5e
commit 522a00e
Showing
235 changed files
with
1,848 additions
and
1,440 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 |
---|---|---|
|
@@ -3,9 +3,8 @@ | |
.node_binaries | ||
node_modules | ||
bower_components | ||
**/*.css | ||
trash | ||
build | ||
bundles | ||
target | ||
.jruby | ||
.idea | ||
|
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,4 +1,5 @@ | ||
{ | ||
"esprima": "./node_modules/babel-jscs", | ||
"maximumLineLength": { | ||
"value": 140, | ||
"allowComments": true | ||
|
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,6 +1,7 @@ | ||
{ | ||
"extends": "./.jshintrc", | ||
"node": true, | ||
"esnext": true, | ||
|
||
"globals": { | ||
"Promise": true, | ||
|
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
Empty file.
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 was deleted.
Oops, something went wrong.
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,24 +1,101 @@ | ||
var _ = require('lodash'); | ||
var join = require('path').join; | ||
|
||
var resolve = require('path').resolve.bind(null, __dirname, '..', '..'); | ||
var KbnServer = require('../server/KbnServer'); | ||
|
||
function kibanaPlugin(kibana) { | ||
var path = require('path'); | ||
var glob = require('glob'); | ||
var join = path.join; | ||
var rel = join.bind(null, __dirname); | ||
|
||
var ROOT = rel('../../../'); | ||
var SRC = join(ROOT, 'src'); | ||
var NODE_MODULES = join(ROOT, 'node_modules'); | ||
var APP = join(SRC, 'kibana'); | ||
var TEST = join(ROOT, 'test'); | ||
var istanbul = require('./lib/istanbul'); | ||
var amdWrapper = require('./lib/amd_wrapper'); | ||
var kibanaSrcFilter = require('./lib/kibana_src_filter'); | ||
|
||
return new kibana.Plugin({ | ||
init: function (server, options) { | ||
server.ext('onPreHandler', istanbul({ root: SRC, displayRoot: SRC, filter: kibanaSrcFilter })); | ||
server.ext('onPreHandler', istanbul({ root: APP, displayRoot: SRC, filter: kibanaSrcFilter })); | ||
|
||
server.route({ | ||
path: '/test/{paths*}', | ||
method: 'GET', | ||
handler: { | ||
directory: { | ||
path: TEST | ||
} | ||
} | ||
}); | ||
|
||
server.route({ | ||
path: '/amd-wrap/{paths*}', | ||
method: 'GET', | ||
handler: amdWrapper({ root: ROOT }) | ||
}); | ||
|
||
server.route({ | ||
path: '/src/{paths*}', | ||
method: 'GET', | ||
handler: { | ||
directory: { | ||
path: SRC | ||
} | ||
} | ||
}); | ||
|
||
server.route({ | ||
path: '/node_modules/{paths*}', | ||
method: 'GET', | ||
handler: { | ||
directory: { | ||
path: NODE_MODULES | ||
} | ||
} | ||
}); | ||
|
||
server.route({ | ||
path: '/specs', | ||
method: 'GET', | ||
handler: function (request, reply) { | ||
var unit = join(ROOT, '/test/unit/'); | ||
glob(join(unit, 'specs/**/*.js'), function (er, files) { | ||
var moduleIds = files | ||
.filter(function (filename) { | ||
return path.basename(filename).charAt(0) !== '_'; | ||
}) | ||
.map(function (filename) { | ||
return path.relative(unit, filename).replace(/\\/g, '/').replace(/\.js$/, ''); | ||
}); | ||
|
||
return reply(moduleIds); | ||
}); | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
|
||
function run(port, quiet) { | ||
return (new KbnServer({ | ||
'env': 'development', | ||
|
||
'logging.quiet': quiet, | ||
'kibana.server.port': port || 5601, | ||
'plugins.paths': [ | ||
join(__dirname, 'dev_statics_plugin') | ||
], | ||
'plugins.scanDirs': [ | ||
join(__dirname, '..', 'plugins') | ||
] | ||
'plugins.paths': [ __dirname ], | ||
'plugins.scanDirs': [ resolve('src/plugins') ], | ||
'optimize.bundleDir': resolve('bundles'), | ||
})) | ||
.listen(); | ||
} | ||
|
||
module.exports = kibanaPlugin; | ||
module.exports.run = run; | ||
|
||
if (require.main === module) { | ||
run().done(); | ||
} else { | ||
module.exports = run; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ev_server/dev_statics_plugin/package.json → src/dev_server/package.json
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,4 +1,4 @@ | ||
{ | ||
"name": "dev_statics", | ||
"name": "dev_server", | ||
"version": "1.0.0" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = function (kibana) { | ||
return new kibana.Plugin({ | ||
uiExports: { | ||
app: { | ||
id: 'switcher', | ||
main: 'plugins/appSwitcher/appSwitcher', | ||
hidden: true, | ||
defaultModules: { | ||
angular: [], | ||
require: [ | ||
'chrome', | ||
'angular-bootstrap' | ||
] | ||
.concat(kibana.autoload.styles) | ||
} | ||
} | ||
} | ||
}); | ||
}; |
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,4 @@ | ||
{ | ||
"name": "appSwitcher", | ||
"version": "1.0.0" | ||
} |
Oops, something went wrong.