From 5f6739fbfcd7406cdb789d8c11a55361c0be4085 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Mon, 7 Apr 2014 15:31:13 -0300 Subject: [PATCH] add gruntfile --- Gruntfile.js | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Gruntfile.js diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000000000..28d2d0a14 --- /dev/null +++ b/Gruntfile.js @@ -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']); + +};