forked from baconjs/bacon.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
43 lines (37 loc) · 1.1 KB
/
Gruntfile.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
module.exports = (grunt) ->
grunt.initConfig
clean:
dist: ['dist/']
coffeelint:
bacon: [ 'src/*.coffee' ]
options:
configFile: 'coffeelint.json'
eslint:
bacon: [ 'src/*.js' ]
options:
configFile: '.eslintrc'
shell:
build:
command: './build'
watch:
coffee:
files: [ 'src/*.coffee' ]
tasks: [ 'coffeelint', 'build' ]
js:
files: [ 'src/*.js' ]
tasls: [ 'eslint', 'build' ]
readme:
files: 'readme-src.coffee'
tasks: 'readme'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-eslint'
grunt.loadNpmTasks 'grunt-shell'
grunt.registerTask 'build', ['shell:build']
grunt.registerTask 'default', ['coffeelint', 'eslint', 'build', 'readme']
grunt.registerTask 'readme', 'Generate README.md', ->
fs = require 'fs'
readmedoc = require './readme-src.coffee'
readmegen = require './readme/readme.coffee'
fs.writeFileSync('README.md', readmegen readmedoc)