Skip to content

Instantly share code, notes, and snippets.

@geta6
Created December 8, 2013 17:02
Show Gist options
  • Save geta6/7860267 to your computer and use it in GitHub Desktop.
Save geta6/7860267 to your computer and use it in GitHub Desktop.
'use strict'
module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-simple-mocha'
grunt.loadNpmTasks 'grunt-notify'
grunt.registerTask 'default', [ 'coffeelint', 'simplemocha', 'coffee' ]
grunt.initConfig
coffee:
dist:
files: [{
expand: yes
cwd: 'src/'
src: [ '**/*.coffee' ]
dest: 'lib/'
ext: '.js'
}]
coffeelint:
options:
max_line_length:
value: 79
indentation:
value: 2
newlines_after_classes:
level: 'error'
no_empty_param_list:
level: 'error'
no_unnecessary_fat_arrows:
level: 'ignore'
dist:
files: [{
expand: yes
cwd: 'src/'
src: [ '**/*.coffee' ]
}]
simplemocha:
options:
ui: 'bdd'
reporter: 'spec'
compilers: 'coffee:coffee-script'
ignoreLeaks: no
dist:
src: [ 'tests/test.coffee' ]
watch:
options:
interrupt: yes
dist:
files: [ 'src/**/*.coffee' ]
tasks: [ 'coffeelint', 'simplemocha', 'coffee' ]
{
"name": "",
"version": "0.0.0",
"private": true,
"description": "",
"main": "",
"scripts": {
"test": "grunt simplemocha"
},
"author": "",
"license": "MIT",
"devDependencies": {
"mocha": "*",
"grunt": "*",
"grunt-simple-mocha": "*",
"grunt-notify": "*",
"grunt-contrib-coffee": "*",
"grunt-coffeelint": "git+https://github.com/geta6/grunt-coffeelint",
"grunt-contrib-watch": "git+https://github.com/gruntjs/grunt-contrib-watch"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment