forked from AOMediaCodec/av1-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
54 lines (54 loc) · 1.36 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
module.exports = (grunt) ->
# Initial grunt configurations
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
clean: [ 'docs' ]
replace: dist:
options: patterns: [ {
match: /@@[a-zA-Z_0-9]*(\[[^\]]*\])*/g
replacement: (match) ->
'<b class="syntax-element">' + match.substring(2) + '</b>'
} ]
files: [ {
src: '_site/index.html'
dest: 'docs/index.html'
} ]
copy:
docs:
files: [ {
expand: true
src: 'assets/**'
dest: 'docs/'
} ]
readme:
files: [ {
expand: true # Not intuitive
flatten: true # Not intuitive
src: '_site/README.html'
dest: 'docs/'
} ]
deprecated: # Preserves ArgonDesign webserver scheme
files: [ {
src: 'docs/index.html'
dest: '_site/av1-spec.html'
} ]
jekyll:
options:
bundleExec: true
skip_initial_build: false
verbose: true
serve: options:
serve: true
dest: '.jekyll'
# Load the NPM tasks.
grunt.loadNpmTasks 'grunt-jekyll'
grunt.loadNpmTasks 'grunt-replace'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-copy'
# Register the default tasks.
grunt.registerTask 'default', [
'clean'
'replace'
'copy'
]
return