fix tether-drop dependency after moving Grafana to webpack

This commit is contained in:
Alexander Zobnin
2017-10-11 20:04:49 +03:00
parent 2bf984c16b
commit 630dd17659
9 changed files with 70 additions and 14 deletions

View File

@@ -15,12 +15,34 @@ module.exports = function(grunt) {
test: {
src: ["dist/test"]
},
vendor: {
src: ["vendor"]
},
tmp: {
src: ["tmp"]
}
},
copy: {
node_modules: {
cwd: './node_modules',
expand: true,
flatten: true,
filter: 'isFile',
src: [
'tether-drop/dist/js/drop.min.js',
'tether/dist/js/tether.min.js',
],
dest: 'vendor/npm'
},
vendor_to_dist: {
cwd: 'vendor',
expand: true,
src: [
'**/*'
],
dest: 'dist/vendor'
},
src_to_dist: {
cwd: 'src',
expand: true,
@@ -29,6 +51,7 @@ module.exports = function(grunt) {
'!datasource-zabbix/*.js',
'!panel-triggers/*.js',
'!components/*.js',
'!vendor/*.js',
'!module.js',
'!**/*.scss'
],
@@ -65,6 +88,7 @@ module.exports = function(grunt) {
'datasource-zabbix/*.js',
'panel-triggers/*.js',
'components/*.js',
'vendor/*.js',
'module.js',
],
dest: 'dist/'
@@ -149,10 +173,9 @@ module.exports = function(grunt) {
});
grunt.registerTask('default', [
'clean:dist',
'clean',
'sass',
'copy:src_to_dist',
'copy:pluginDef',
'copy',
'jshint',
'jscs',
'babel',
@@ -162,6 +185,7 @@ module.exports = function(grunt) {
grunt.registerTask('watchTask', [
'clean:dist',
'sass',
'copy:vendor_to_dist',
'copy:src_to_dist',
'copy:pluginDef',
'babel',