forked from rubenv/grunt-angular-gettext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
76 lines (66 loc) · 2.6 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
module.exports = (grunt) ->
@loadNpmTasks('grunt-contrib-clean')
@loadNpmTasks('grunt-contrib-jshint')
@loadNpmTasks('grunt-contrib-watch')
@loadNpmTasks('grunt-mocha-cli')
@loadNpmTasks('grunt-release')
@loadTasks('tasks')
@initConfig
jshint:
all: [ 'tasks/*.js' ]
options:
jshintrc: '.jshintrc'
clean:
tmp: ['tmp']
watch:
test:
files: ['tasks/**.js', 'test/*{,/*}.coffee']
tasks: ['test']
mochacli:
options:
files: 'test/*_test.coffee'
compilers: ['coffee:coffee-script']
spec:
options:
reporter: 'spec'
nggettext_extract:
auto:
files:
'tmp/test1.pot': 'test/fixtures/single.html'
'tmp/test2.pot': ['test/fixtures/single.html', 'test/fixtures/second.html']
'tmp/test3.pot': 'test/fixtures/plural.html'
'tmp/test4.pot': 'test/fixtures/merge.html'
'tmp/test6.pot': 'test/fixtures/filter.html'
'tmp/test7.pot': 'test/fixtures/source.js'
'tmp/test8.pot': 'test/fixtures/quotes.html'
'tmp/test9.pot': 'test/fixtures/strip.html'
'tmp/test10.pot': 'test/fixtures/ngif.html'
'tmp/test12.pot': 'test/fixtures/php.php'
'tmp/test13.pot': 'test/fixtures/sort.html'
'tmp/test14.pot': 'test/fixtures/concat.js'
'tmp/test15.pot': 'test/fixtures/data.html'
manual:
files:
'tmp/test5.pot': 'test/fixtures/corrupt.html'
custom:
options:
startDelim: '[['
endDelim: ']]'
files:
'tmp/test11.pot': 'test/fixtures/delim.html'
nggettext_compile:
test1:
files:
'tmp/test1.js': 'test/fixtures/nl.po'
test2:
options:
module: 'myApp'
files:
'tmp/test2.js': 'test/fixtures/nl.po'
test3:
files:
'tmp/test3.js': 'test/fixtures/{nl,fr}.po'
@registerTask 'default', ['test']
@registerTask 'build', ['clean', 'jshint']
@registerTask 'package', ['build', 'release']
@registerTask 'test', ['build', 'nggettext_extract:auto', 'nggettext_extract:custom', 'nggettext_compile', 'mochacli']