'use strict'; module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-sass'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-jslint'); grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), project: { app: ['app'], assets: ['<%= project.app %>/assets'], css: ['<%= project.assets %>/sass/app.scss'] }, sass: { dev: { options: { style: 'expanded', compass: false }, files: { '<%= project.assets %>/css/app.css' : '<%= project.css %>' } } }, watch: { sass: { files: [ '<%= project.assets %>/sass/{,*/}*.{scss,sass}', '<%= project.app %>/{,*/}*/{,*/}*.{scss,sass}' ], tasks: ['sass:dev'] } }, jslint: { // configure the task client: { src: [ 'karma.conf.js', 'Gruntfile.js', 'app/app.js', 'app/**/*.js' ], exclude: [ 'app/bower_components/**/*.js', 'app/assets/**/*' ], directives: { node: true, unparam: true, // TEMPORARY: Ignore unused params nomen: true, predef: [ // Global variables 'angular', 'inject', 'JustGage', 'describe', 'beforeEach', 'it', 'expect', 'moment' ] }, options: { edition: 'latest', // specify an edition of jslint or use 'dir/mycustom-jslint.js' for own path junit: 'out/client-junit.xml', // write the output to a JUnit XML log: 'out/client-lint.log', jslintXml: 'out/client-jslint.xml', errorsOnly: true, // only display errors failOnError: false, // defaults to true checkstyle: 'out/client-checkstyle.xml' // write a checkstyle-XML } } } }); grunt.registerTask('default', [ 'watch', 'jslint' ]); };