mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 21:53:00 +08:00
Webpack (#9391)
* webpack poc, this is not going to work for plugins, dam * tech: webpack and systemjs for plugins starting to work * tech: webpack and systemjs combo starting to work * tech: webpack + karma tests progress * tech: webpack + karma progress * tech: working on tests * tech: webpack * tech: webpack + karma, all tests pass * tech: webpack + karma, all tests pass * tech: webpack all tests pass * webpack: getting closer * tech: webpack progress * webpack: further build refinements * webpack: ng annotate fixes * webpack: optimized build fix * tech: minor fix for elasticsearch * tech: webpack + ace editor * tech: restored lodash move mixin compatability * tech: added enzyme react test and upgraded to react v16 * tech: package version fix * tech: added testdata to built in bundle * webpack: sass progress * tech: prod & dev build is working for the sass * tech: clean up unused grunt stuff and moved to scripts folder * tech: added vendor and manifest chunks, updated readme and docs * tech: webpack finishing touches
This commit is contained in:
34
scripts/grunt/default_task.js
Normal file
34
scripts/grunt/default_task.js
Normal file
@ -0,0 +1,34 @@
|
||||
// Lint and build CSS
|
||||
module.exports = function(grunt) {
|
||||
'use strict';
|
||||
|
||||
grunt.registerTask('default', [
|
||||
'clean:build',
|
||||
'phantomjs',
|
||||
'webpack:dev',
|
||||
]);
|
||||
|
||||
grunt.registerTask('test', [
|
||||
'clean:build',
|
||||
'jscs',
|
||||
'jshint',
|
||||
'sasslint',
|
||||
'exec:tslint',
|
||||
'karma:test',
|
||||
'no-only-tests'
|
||||
]);
|
||||
|
||||
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)
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user