1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-10 21:24:20 +01:00
fab-manager/vendor/assets/components/angular-ui-select2/Gruntfile.js
2015-05-05 03:10:25 +02:00

57 lines
1.3 KiB
JavaScript

module.exports = function (grunt) {
'use strict';
var initConfig;
// Loading external tasks
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-karma');
// Project configuration.
initConfig = {
bower: 'bower_components',
pkg: grunt.file.readJSON('package.json'),
watch: {
test: {
// Lint & run unit tests in Karma
// Just running `$ grunt watch` will only lint your code; to run tests
// on watch, use `$ grunt watch:karma` to start a Karma server first
files: ['src/select2.js', 'test/select2Spec.js'],
tasks: ['jshint', 'karma:unit:run']
}
},
karma: {
options: {
configFile: 'test/karma.conf.js',
browsers: ['Firefox', 'PhantomJS']
},
unit: {
singleRun: true
},
watch: {
autoWatch: true
},
server: {
background: true
}
},
jshint: {
all:[
'gruntFile.js',
'src/**/*.js',
'test/**/*Spec.js'
],
options: {
jshintrc: '.jshintrc'
}
},
};
// Register tasks
grunt.registerTask('default', ['jshint', 'karma:unit']);
grunt.registerTask('watch', ['jshint', 'karma:watch']);
grunt.initConfig(initConfig);
};