grafana/tasks/default_task.js

44 lines
962 B
JavaScript
Raw Normal View History

2013-11-14 17:07:14 -06:00
// Lint and build CSS
module.exports = function(grunt) {
2015-09-10 04:26:40 -05:00
'use strict';
grunt.registerTask('css', [
'sass',
'concat:cssDark',
'concat:cssLight',
'concat:cssFonts',
'styleguide',
'sasslint',
'postcss',
]
);
2015-09-10 04:26:40 -05:00
grunt.registerTask('default', [
2017-04-20 04:59:11 -05:00
'clean:gen',
2015-09-10 04:26:40 -05:00
'jscs',
'jshint',
'copy:node_modules',
2015-09-10 05:42:24 -05:00
'copy:public_to_gen',
'exec:tslint',
'phantomjs',
2015-09-10 04:26:40 -05:00
'css',
2016-12-09 15:53:00 -06:00
'exec:tscompile'
2015-09-10 04:26:40 -05:00
]);
grunt.registerTask('test', ['default', 'karma:test', 'no-only-tests']);
2015-12-16 05:21:13 -06:00
grunt.registerTask('no-only-tests', function() {
var files = grunt.file.expand('public/**/*_specs\.ts', 'public/**/*_specs\.js');
files.forEach(function(spec) {
var rows = grunt.file.read(spec).split('\n');
rows.forEach(function(row) {
if (row.indexOf('.only(') > 0) {
grunt.log.errorlns(row);
grunt.fail.warn('found only statement in test: ' + spec)
}
});
});
});
2014-05-31 00:46:39 -05:00
};