-
Notifications
You must be signed in to change notification settings - Fork 18
/
Gruntfile.coffee
executable file
·82 lines (71 loc) · 1.87 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
clean:
all:
options: force: yes
src: ['.tmp', 'tasks/*.js', 'test/**/*.js']
coffeelint:
tasks: 'tasks/*.coffee'
test: 'test/*.coffee'
grunt: 'Gruntfile.coffee'
options:
max_line_length:
value: 120
level: 'warn'
no_trailing_whitespace:
level: 'warn'
no_tabs:
level: 'error'
indentation:
value: 2
level: 'error'
coffee:
tasks:
files:
'tasks/i18n.js': 'tasks/i18n.coffee'
options:
bare: true
pug:
translateDir:
options:
i18n:
locales: 'test/locales/*'
pretty: true
files:
'.tmp/sample.pug': 'test/fixtures/directory/*.pug'
translateFile:
options:
i18n:
locales: [ 'test/locales/*' ]
namespace: '$t'
localeExtension: true
client: false
pretty: true
files: [
expand: true
ext: '.html'
cwd: 'test/fixtures/file'
src: [ '*.pug' ]
dest: '.tmp/'
]
noI18n:
options:
data:
$i18n:
message: 'Hello world!'
nested:
msg: 'and hello to you'
pretty: true
files:
'.tmp/no-i18n.html': 'test/fixtures/directory/*.pug'
nodeunit:
tests: ['test/*_test.coffee']
grunt.loadTasks 'tasks'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-nodeunit'
grunt.loadNpmTasks 'grunt-release'
grunt.registerTask 'default', ['clean', 'coffeelint']
grunt.registerTask 'test', ['default', 'pug', 'nodeunit']