Commit b48b2ac6 by Torkel Ödegaard

Updated grunt tasks for the src -> public directory change

parent fde11be2
...@@ -8,11 +8,11 @@ module.exports = function(config) { ...@@ -8,11 +8,11 @@ module.exports = function(config) {
// list of files / patterns to load in the browser // list of files / patterns to load in the browser
files: [ files: [
'src/test/test-main.js', 'public/test/test-main.js',
{pattern: 'src/app/**/*.js', included: false}, {pattern: 'public/app/**/*.js', included: false},
{pattern: 'src/vendor/**/*.js', included: false}, {pattern: 'public/vendor/**/*.js', included: false},
{pattern: 'src/test/**/*.js', included: false}, {pattern: 'public/test/**/*.js', included: false},
{pattern: 'src/**/*.js', included: false} {pattern: 'public/**/*.js', included: false}
], ],
// list of files to exclude // list of files to exclude
......
require.config({ require.config({
baseUrl: 'http://localhost:9876/base/src/app', baseUrl: 'http://localhost:9876/base/public/app',
paths: { paths: {
specs: '../test/specs', specs: '../test/specs',
......
module.exports = function(config) { module.exports = function(config) {
return { return {
dev: { dev: {
configFile: 'src/test/karma.conf.js', configFile: '<%= srcDir %>/test/karma.conf.js',
singleRun: false, singleRun: false,
}, },
debug: { debug: {
configFile: 'src/test/karma.conf.js', configFile: '<%= srcDir %>/test/karma.conf.js',
singleRun: false, singleRun: false,
browsers: ['Chrome'] browsers: ['Chrome']
}, },
test: { test: {
configFile: 'src/test/karma.conf.js', configFile: '<%= srcDir %>/test/karma.conf.js',
}, },
coveralls: { coveralls: {
configFile: 'src/test/karma.conf.js', configFile: '<%= srcDir %>/test/karma.conf.js',
reporters: ['dots','coverage','coveralls'], reporters: ['dots','coverage','coveralls'],
preprocessors: { preprocessors: {
'src/app/**/*.js': ['coverage'] '<%= srcDir %>/app/**/*.js': ['coverage']
}, },
coverageReporter: { coverageReporter: {
type: 'lcov', type: 'lcov',
......
...@@ -61,7 +61,10 @@ module.exports = function(config,grunt) { ...@@ -61,7 +61,10 @@ module.exports = function(config,grunt) {
'controllers/all', 'controllers/all',
'routes/all', 'routes/all',
'components/partials', 'components/partials',
// bundle the datasources
'plugins/datasource/grafana/datasource', 'plugins/datasource/grafana/datasource',
'plugins/datasource/graphite/datasource',
'plugins/datasource/influxdb_08/datasource',
] ]
} }
]; ];
...@@ -69,7 +72,7 @@ module.exports = function(config,grunt) { ...@@ -69,7 +72,7 @@ module.exports = function(config,grunt) {
var fs = require('fs'); var fs = require('fs');
var panelPath = config.srcDir+'/app/panels'; var panelPath = config.srcDir+'/app/panels';
// create a module for each directory in src/app/panels/ // create a module for each directory in public/app/panels/
fs.readdirSync(panelPath).forEach(function (panelName) { fs.readdirSync(panelPath).forEach(function (panelName) {
requireModules[0].include.push('panels/'+panelName+'/module'); requireModules[0].include.push('panels/'+panelName+'/module');
requireModules[0].include.push('text!panels/'+panelName+'/module.html'); requireModules[0].include.push('text!panels/'+panelName+'/module.html');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment