Skip to content

Commit

Permalink
Grunt setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Welcher committed Feb 14, 2015
1 parent 8efc97a commit eb3359a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
13 changes: 7 additions & 6 deletions Gruntfile.js
@@ -1,5 +1,7 @@
module.exports = function(grunt) {

// Load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
Expand All @@ -10,16 +12,15 @@ module.exports = function(grunt) {
}
}
},
jshint: {
all: ['assets/script.js']
},
watch: {
files: ['assets/script.js'],
tasks: ['uglify']
tasks: ['jshint', 'uglify']
}
});

// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');

// Default task(s).
grunt.registerTask('default', ['uglify']);
grunt.registerTask( 'default', ['jshint', 'uglify'] );
};
3 changes: 1 addition & 2 deletions assets/script.js
Expand Up @@ -79,10 +79,9 @@ jQuery( function( $ ) {
that.checkLength(this);
});
}
}
};
}
};

//start the show
LIMIT_WIDGETS.init();
});
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -24,6 +24,8 @@
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-uglify": "~0.7.0",
"grunt-contrib-watch": "~0.6.1"
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-jshint": "~0.11.0",
"matchdep": "~0.3.0"
}
}

0 comments on commit eb3359a

Please sign in to comment.