zensh
Version:
A javascript neural network: self-referential, evolution, interconnection...
52 lines (41 loc) • 1.18 kB
JavaScript
/* jshint node: true */
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/**\n' +
' * <%= pkg.name %>: v<%= pkg.version %>\n' +
' * <%= pkg.homepage %>\n' +
' */\n',
// Task configuration.
clean: ["thunks.min.js"],
jshint: {
options: {
jshintrc: '.jshintrc'
},
build: ['index.js', 'Gruntfile.js', 'test/*.js', 'lib/*.js', '!examples/*co.js', '*.json']
},
uglify: {
options: {
banner: '<%= banner %>'
},
thunks: {
dest: 'thunks.min.js',
src: 'thunks.js'
}
},
nodeunit: {
all: ['test/nodeunit.js']
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
// Default task.
grunt.registerTask('default', ['jshint:build', 'nodeunit', 'clean', 'uglify']);
grunt.registerTask('test', ['jshint:build', 'nodeunit']);
};