Added eslint to the build

Fixes #102
This commit is contained in:
Colin Eberhardt
2015-08-11 16:52:57 +01:00
parent 74925f4439
commit 401f473449
7 changed files with 56 additions and 61 deletions

View File

@@ -2,6 +2,8 @@
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
paths: {
@@ -12,6 +14,13 @@ module.exports = function(grunt) {
clean: ['<%= paths.distFolder %>'],
eslint: {
options: {
configFile: '.eslintrc'
},
target: ['<%= paths.srcFolder %>/Layout.js']
},
copy: {
main: {
expand: true,
@@ -52,13 +61,7 @@ module.exports = function(grunt) {
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-karma');
grunt.registerTask('build', ['clean', 'karma' ,'copy', 'uglify']);
grunt.registerTask('build', ['eslint', 'clean', 'karma' ,'copy', 'uglify']);
grunt.registerTask('default', ['build']);
};