mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge commit '65c3d1bf3868ad3e1caec9fc77021735df53f989' into issue-711
This commit is contained in:
@@ -24,11 +24,12 @@ module.exports = function (grunt) {
|
||||
|
||||
jshint: {
|
||||
all: [
|
||||
'Gruntfile.js', 'src/js/*.js'
|
||||
'Gruntfile.js', 'src/js/*.js', 'test/*.js'
|
||||
],
|
||||
options: {
|
||||
'browser' : true,
|
||||
'node' : true,
|
||||
'jquery' : true,
|
||||
'boss' : false,
|
||||
'curly' : true,
|
||||
'debug' : false,
|
||||
@@ -57,15 +58,24 @@ module.exports = function (grunt) {
|
||||
'quotmark' : 'single',
|
||||
'globals': {
|
||||
'define': false,
|
||||
'jQuery': false,
|
||||
'moment': false
|
||||
'moment': false,
|
||||
// Jasmine
|
||||
'jasmine': false,
|
||||
'describe': false,
|
||||
'xdescribe': false,
|
||||
'expect': false,
|
||||
'it': false,
|
||||
'xit': false,
|
||||
'spyOn': false,
|
||||
'beforeEach': false,
|
||||
'afterEach': false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
jscs: {
|
||||
all: [
|
||||
'Gruntfile.js', 'src/js/*.js'
|
||||
'Gruntfile.js', 'src/js/*.js', 'test/*.js'
|
||||
],
|
||||
options: {
|
||||
config: '.jscs.json'
|
||||
@@ -86,22 +96,49 @@ module.exports = function (grunt) {
|
||||
'build/css/bootstrap-datetimepicker.css': 'src/less/bootstrap-datetimepicker-build.less'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
jasmine: {
|
||||
customTemplate: {
|
||||
src: 'src/js/*.js',
|
||||
options: {
|
||||
specs: 'test/*Spec.js',
|
||||
helpers: 'test/*Helper.js',
|
||||
styles: [
|
||||
'node_modules/bootstrap/dist/css/bootstrap.min.css',
|
||||
'build/css/bootstrap-datetimepicker.min.css'
|
||||
],
|
||||
vendor: [
|
||||
'node_modules/jquery/dist/jquery.min.js',
|
||||
'node_modules/moment/min/moment-with-locales.min.js',
|
||||
'node_modules/bootstrap/dist/js/bootstrap.min.js'
|
||||
],
|
||||
display: 'none',
|
||||
summary: 'true'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
grunt.loadTasks('tasks');
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-jasmine');
|
||||
|
||||
// These plugins provide necessary tasks.
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
// Default task.
|
||||
grunt.registerTask('default', ['jshint', 'jscs']);
|
||||
grunt.registerTask('default', ['jshint', 'jscs', 'less', 'jasmine']);
|
||||
|
||||
// travis build task
|
||||
grunt.registerTask('build:travis', [
|
||||
// code style
|
||||
'jshint', 'jscs'
|
||||
'jshint', 'jscs',
|
||||
// build
|
||||
'uglify', 'less',
|
||||
// tests
|
||||
'jasmine'
|
||||
]);
|
||||
|
||||
// Task to be run when building
|
||||
@@ -131,7 +168,7 @@ module.exports = function (grunt) {
|
||||
done();
|
||||
});
|
||||
}
|
||||
else {
|
||||
else { //--target=css
|
||||
grunt.util.spawn({
|
||||
cmd: 'src/nuget/nuget.exe',
|
||||
args: [
|
||||
@@ -152,4 +189,6 @@ module.exports = function (grunt) {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
grunt.registerTask('test', ['jshint', 'jscs', 'uglify', 'less', 'jasmine']);
|
||||
};
|
||||
|
Reference in New Issue
Block a user