add gruntfile

This commit is contained in:
Matias Alejo Garcia 2014-04-07 15:31:13 -03:00
parent 6b2d3cda35
commit 5f6739fbfc
1 changed files with 51 additions and 0 deletions

51
Gruntfile.js Normal file
View File

@ -0,0 +1,51 @@
module.exports = function(grunt) {
//Load NPM tasks
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-markdown');
grunt.loadNpmTasks('grunt-shell');
// Project Configuration
grunt.initConfig({
shell: {
browserify: {
options: {
stdout: true,
stderr: true
},
command: grunt.option('target') === 'dev' ?
'node ./util/build.js -d ' : 'node ./util/build.js '
}
},
watch: {
readme: {
files: ['README.md'],
tasks: ['markdown']
},
scripts: {
files: ['**/*.js', '**/*.html', '!**/node_modules/**', '!browser/bundle.js', '!browser/testdata.js', '!lib/**js', '!browser/vendor-bundle.js'],
tasks: ['shell'],
},
},
mochaTest: {
options: {
reporter: 'spec',
},
src: ['test/*.js'],
},
markdown: {
all: {
files: [{
expand: true,
src: 'README.md',
dest: '.',
ext: '.html'
}]
}
}
});
grunt.registerTask('default', ['shell','watch']);
};