Skip to content

Commit

Permalink
Add Gruntfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorccu committed Jul 3, 2013
1 parent a197bae commit 63b3d79
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
module.exports = (grunt) ->

grunt.initConfig
pkg: require './package'
coffee:
src:
expand: true
cwd: 'src'
src: '**/*.coffee'
dest: 'lib'
ext: '.js'
index:
src: 'index.coffee'
dest: 'index.js'
coffeelint:
src:
src: '<%= coffee.src.cwd %>/<%= coffee.src.src %>'
index:
src: '<%= coffee.index.src %>'
test:
src: 'test/**/*.coffee'
gruntfile:
src: 'Gruntfile.coffee'
jsonlint:
packagejson:
src: 'package.json'
watch:
src:
files: '<%= coffee.src.cwd %>/<%= coffee.src.src %>'
tasks: ['coffeelint:src', 'test']
index:
files: '<%= coffee.index.src %>'
tasks: ['coffeelint:index', 'test']
test:
files: '<%= coffeelint.test.src %>',
tasks: ['coffeelint:test', 'test']
gruntfile:
files: '<%= coffeelint.gruntfile.src %>'
tasks: ['coffeelint:gruntfile']
packagejson:
files: '<%= jsonlint.packagejson.src %>'
tasks: ['jsonlint:packagejson']
exec:
mocha:
options: [
'--compilers coffee:coffee-script'
'--reporter spec'
'--colors'
'--recursive'
],
cmd: './node_modules/.bin/mocha <%= exec.mocha.options.join(" ") %>'

grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-jsonlint'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-notify'
grunt.loadNpmTasks 'grunt-exec'

grunt.registerTask 'test', ['jsonlint', 'coffeelint', 'exec:mocha']
grunt.registerTask 'build', ['coffee']
grunt.registerTask 'default', ['test']

0 comments on commit 63b3d79

Please sign in to comment.