2014-01-30 08:29:14 -08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
module.exports = function(grunt) {
|
|
|
|
|
|
|
|
//Load NPM tasks
|
2014-01-30 12:17:06 -08:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
|
|
grunt.loadNpmTasks('grunt-mocha-test');
|
2014-02-17 11:39:13 -08:00
|
|
|
grunt.loadNpmTasks('grunt-markdown');
|
2014-03-08 13:42:08 -08:00
|
|
|
grunt.loadNpmTasks('grunt-shell');
|
2014-01-30 08:29:14 -08:00
|
|
|
|
|
|
|
// Project Configuration
|
|
|
|
grunt.initConfig({
|
2014-03-08 13:42:08 -08:00
|
|
|
shell: {
|
|
|
|
browserify: {
|
2014-03-10 10:09:11 -07:00
|
|
|
options: {
|
|
|
|
stdout: true,
|
|
|
|
stderr: true
|
|
|
|
},
|
2014-03-12 05:38:21 -07:00
|
|
|
command: 'node ./browser/build.js -a',
|
2014-03-10 09:44:22 -07:00
|
|
|
}
|
2014-03-08 13:42:08 -08:00
|
|
|
},
|
2014-01-30 12:17:06 -08:00
|
|
|
watch: {
|
2014-02-17 11:39:13 -08:00
|
|
|
readme: {
|
|
|
|
files: ['README.md'],
|
|
|
|
tasks: ['markdown']
|
|
|
|
},
|
2014-01-30 12:17:06 -08:00
|
|
|
scripts: {
|
2014-03-11 13:53:46 -07:00
|
|
|
files: ['**/*.js', '**/*.html', '!**/node_modules/**', '!browser/bundle.js', '!browser/testdata.js', '!browser/vendor-bundle.js'],
|
2014-03-10 09:44:22 -07:00
|
|
|
tasks: ['shell'],
|
2014-01-30 12:17:06 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
mochaTest: {
|
|
|
|
options: {
|
|
|
|
reporter: 'spec',
|
|
|
|
},
|
|
|
|
src: ['test/*.js'],
|
|
|
|
},
|
2014-02-17 11:39:13 -08:00
|
|
|
markdown: {
|
|
|
|
all: {
|
2014-02-24 06:59:43 -08:00
|
|
|
files: [{
|
|
|
|
expand: true,
|
|
|
|
src: 'README.md',
|
|
|
|
dest: '.',
|
|
|
|
ext: '.html'
|
|
|
|
}]
|
2014-02-17 11:39:13 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-01-30 12:17:06 -08:00
|
|
|
|
2014-01-30 08:29:14 -08:00
|
|
|
});
|
|
|
|
|
2014-01-30 12:17:06 -08:00
|
|
|
grunt.registerTask('default', ['watch']);
|
2014-01-30 08:29:14 -08:00
|
|
|
|
|
|
|
};
|