-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
50 lines (48 loc) · 955 Bytes
/
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
module.exports = (grunt) ->
grunt.initConfig
apidoc:
nexrad:
src: 'src/'
dest: 'docs/'
'string-replace':
nexrad:
files:
'README.md': 'api.md'
options:
replacements: [
{
pattern: /[^}]\n(```)(\n.)/ig
replacement: '\n$1json$2'
}
{
pattern: /<p>|<\/p>/ig
replacement: ''
}
]
clean:
docs: [
'api.md'
]
coffee:
server:
files: [
expand: true
cwd: 'src/server/'
src: ['**/*.coffee']
dest: '.'
ext: '.js'
]
client:
files: [
expand: true
cwd: 'src/client/'
src: ['**/*.coffee']
dest: './static/'
ext: '.js'
]
grunt.loadNpmTasks 'grunt-apidoc'
grunt.loadNpmTasks 'grunt-string-replace'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.registerTask 'default', ['string-replace', 'clean', 'coffee']
grunt.registerTask 'gendocs', ['apidoc']