2014-06-18 19:35:37 +02:00
|
|
|
module.exports = function (grunt) {
|
2014-11-11 19:00:59 +01:00
|
|
|
var notIncludedComponents = '{font-awesome,requirejs,zeroclipboard}';
|
2014-06-18 19:35:37 +02:00
|
|
|
return {
|
|
|
|
build: '<%= build %>',
|
|
|
|
target: '<%= target %>',
|
|
|
|
unneeded_source_in_build: {
|
|
|
|
src: [
|
|
|
|
// select all top level folders in bower_components
|
2014-08-26 02:55:32 +02:00
|
|
|
'<%= build %>/kibana/public/bower_components/*',
|
2014-11-11 19:00:59 +01:00
|
|
|
|
2014-06-18 19:35:37 +02:00
|
|
|
// exclude the following top level components
|
2014-08-26 02:55:32 +02:00
|
|
|
'!<%= build %>/kibana/public/bower_components/' + notIncludedComponents,
|
2014-11-11 19:00:59 +01:00
|
|
|
|
|
|
|
// remove the all bower_components except for notIncludedComponents, and keep the one files they need
|
2014-08-26 02:55:32 +02:00
|
|
|
'<%= build %>/kibana/public/bower_components/' + notIncludedComponents + '/*',
|
|
|
|
'!<%= build %>/kibana/public/bower_components/requirejs/require.js',
|
|
|
|
'!<%= build %>/kibana/public/bower_components/font-awesome/fonts',
|
2014-11-11 19:00:59 +01:00
|
|
|
'!<%= build %>/kibana/public/bower_components/zeroclipboard/dist',
|
|
|
|
|
|
|
|
// delete the contents of the dist dir, except the ZeroClipboard.swf file
|
|
|
|
'<%= build %>/kibana/public/bower_components/zeroclipboard/dist/*',
|
|
|
|
'!<%= build %>/kibana/public/bower_components/zeroclipboard/dist/ZeroClipboard.swf',
|
|
|
|
|
2014-08-26 02:55:32 +02:00
|
|
|
'<%= build %>/kibana/public/**/_empty_',
|
|
|
|
'<%= build %>/kibana/public/**/*.less',
|
|
|
|
'<%= build %>/kibana/public/config',
|
|
|
|
'<%= build %>/kibana/public/{css-builder,normalize}.js',
|
2014-10-23 08:30:49 +02:00
|
|
|
'<%= app %>/public/{css-builder,normalize}.js'
|
2014-06-18 19:35:37 +02:00
|
|
|
]
|
2014-10-23 08:30:49 +02:00
|
|
|
},
|
|
|
|
dev_only_plugins: '<%= build %>/src/plugins/<%= devPlugins %>'
|
2014-06-18 19:35:37 +02:00
|
|
|
};
|
2014-08-26 02:55:32 +02:00
|
|
|
};
|