forked from geta6/Gyazz
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.coffee
90 lines (78 loc) · 1.72 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
'use strict'
module.exports = (grunt) ->
(require 'jit-grunt') grunt,
simplemocha: 'grunt-simple-mocha'
require 'coffee-errors'
grunt.loadNpmTasks 'grunt-notify'
grunt.registerTask 'test', [
'coffeelint'
'simplemocha'
'jsonlint'
'csslint'
]
grunt.registerTask 'default', [ 'test', 'build', 'watch' ]
grunt.registerTask 'build', [ 'coffee' ]
grunt.initConfig
csslint:
strict:
src: [
'**/gyazz.css'
'!node_modules/**'
]
jsonlint:
config:
src: [
'**/*.json'
'!node_modules/**'
'!tmp/**'
]
coffeelint:
options:
max_line_length:
value: 119
indentation:
value: 2
newlines_after_classes:
level: 'error'
no_empty_param_list:
level: 'error'
no_unnecessary_fat_arrows:
level: 'ignore'
dist:
files:
src: [
'**/*.coffee'
'!node_modules/**'
'!tmp/**'
]
simplemocha:
options:
ui: 'bdd'
reporter: 'spec'
compilers: 'coffee:coffee-script'
ignoreLeaks: no
dist:
src: [ 'tests/test_*.coffee' ]
coffee:
compile:
files: [{
expand: yes
cwd: 'public/javascripts/'
src: [ '**/*.coffee' ]
dest: 'public/javascripts/'
ext: '.js'
}]
options: {
sourceMap: yes
}
watch:
options:
interrupt: yes
dist:
files: [
'**/*.{coffee,js,jade,json,css}'
'!node_modules/**'
'!tmp/**'
'!public/**/*.js'
]
tasks: [ 'test', 'build' ]