-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.coffee
43 lines (39 loc) · 1.16 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
pkg: grunt.file.readJSON('package.json')
clean:
dist: ['dist/**/*']
coffee:
compile:
expand: true
options:
bare: true
cwd: "#{__dirname}/src"
src: ['**/*.coffee']
dest: 'dist/'
ext: '.js'
usebanner:
executables:
options:
position: 'top'
linebreak: true
banner: '#!/usr/bin/env node'
src: [
'dist/index-cli.js',
'dist/search-cli.js'
]
coffeelint:
files:
src: ['src/**/*.coffee']
options:
configFile: 'coffeelint.json'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-banner'
grunt.registerTask 'test', ['coffeelint']
grunt.registerTask 'default', [
'clean',
'coffee:compile',
'usebanner',
]