assemble-utils
Version:
Utilities built for the Assemble project.
61 lines (52 loc) • 1.26 kB
JavaScript
/*
* Assemble
* http://github.com/assemble/assemble
*
* Copyright (c) 2013 Assemble
* MIT License
*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// package.json
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
},
jshint: {
options: {
jshintrc: '.jshintrc'
},
files: [
'Gruntfile.js',
'lib/**/*.js',
'test/**/*.js'
]
},
// Run mocha tests.
mochaTest: {
files: ['test/**/*.js']
},
mochaTestConfig: {
options: {
reporter: 'nyan'
}
}
});
// Load npm plugins to provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-mocha-test');
// Default task.
grunt.registerTask('default', [
'jshint'
]);
// Tests to be run.
grunt.registerTask('test', [
'jshint',
'mochaTest'
]);
};