mirror of
https://github.com/grafana/grafana.git
synced 2025-01-09 23:53:25 -06:00
38 lines
848 B
JavaScript
38 lines
848 B
JavaScript
module.exports = function(grunt) {
|
|
|
|
// Concat and Minify the src directory into dist
|
|
grunt.registerTask('build', [
|
|
'jshint:source',
|
|
'jshint:tests',
|
|
'clean:on_start',
|
|
'less:src',
|
|
'concat:css',
|
|
'copy:everything_but_less_to_temp',
|
|
'htmlmin:build',
|
|
'ngtemplates',
|
|
'cssmin:build',
|
|
'build:grafanaVersion',
|
|
'ngmin:build',
|
|
'requirejs:build',
|
|
'concat:js',
|
|
'filerev',
|
|
'usemin',
|
|
'clean:temp',
|
|
'uglify:dest'
|
|
]);
|
|
|
|
|
|
grunt.registerTask('build:grafanaVersion', function() {
|
|
grunt.config('string-replace.config', {
|
|
files: {
|
|
'<%= tempDir %>/app/app.js': '<%= tempDir %>/app/app.js'
|
|
},
|
|
options: {
|
|
replacements: [{ pattern: /@grafanaVersion@/g, replacement: '<%= pkg.version %>' }]
|
|
}
|
|
});
|
|
grunt.task.run('string-replace:config');
|
|
});
|
|
|
|
};
|