Commit 963051b0 authored by Kjetil Thuen's avatar Kjetil Thuen

Switchd to jslint. Removed all lint

parent 1ea825dc
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bower: {
install: {
//just run 'grunt bower:install' and you'll see files from your Bower packages in lib directory
}
},
concat: {
options: {
// define a string to put between each file in the concatenated output
separator: ';'
},
dist: {
// the files to concatenate
src: ['src/**/*.js'],
// the location of the resulting JS file
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
options: {
// the banner is inserted at the top of the output
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
}
},
jshint: {
// define the files to lint
files: ['gruntfile.js', 'src/*.js'],
// configure JSHint (documented at http://www.jshint.com/docs/)
options: {
// more options here if you want to override JSHint defaults
globals: {
jQuery: true,
console: true,
module: true
}
}
},
clean: {
dist: ['dist', 'lib'],
bower: ['bower_components']
},
watch: {
scripts: {
files: ['**/*.js'],
tasks: ['jshint', 'concat'],
options: {
spawn: false
/*global module */
module.exports = function (grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bower: {
install: {
//just run 'grunt bower:install' and you'll see files from your Bower packages in lib directory
}
},
concat: {
options: {
// define a string to put between each file in the concatenated output
separator: ';'
},
dist: {
// the files to concatenate
src: ['src/**/*.js'],
// the location of the resulting JS file
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
options: {
// the banner is inserted at the top of the output
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
}
},
jslint: {
all: {
src: [
'src/**/*.js',
'gruntfile.js'
]
}
},
clean: {
dist: ['dist', 'lib'],
bower: ['bower_components']
},
watch: {
scripts: {
files: ['**/*.js'],
tasks: ['jslint', 'concat'],
options: {
spawn: false
}
}
},
bump: {
options: {
files: ['package.json', 'bower.json'],
pushTo: 'origin',
commitFiles: ['package.json', 'bower.json']
}
}
}
},
bump: {
options: {
files: ['package.json', 'bower.json'],
pushTo: 'origin',
commitFiles: ['package.json', 'bower.json']
}
}
});
});
// Load libs
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-bump');
// Load libs
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-jslint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-bump');
// Tasks
grunt.registerTask('test', ['jshint']);
grunt.registerTask('default', ['bower', 'jshint', 'concat', 'uglify']);
grunt.registerTask('install', ['bower']);
// Tasks
grunt.registerTask('test', ['jslint']);
grunt.registerTask('default', ['bower', 'jslint', 'concat', 'uglify']);
grunt.registerTask('install', ['bower']);
};
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment