forked from kevinlacotaco/yuidoc-bootstrap-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
106 lines (95 loc) · 2.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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
path = require 'path'
HOSTNAME = process.env.HOSTNAME ? '0.0.0.0'
PORT = process.env.PORT ? 3000
module.exports = (grunt) ->
config =
jade:
options:
pretty: true
layouts:
expand: true
cwd: 'layouts'
src: '**/*.jade'
dest: 'layouts'
ext: '.handlebars'
partials:
expand: true
cwd: 'partials'
src: '**/*.jade'
dest: 'partials'
ext: '.handlebars'
stylus:
assets:
expand: true
cwd: 'assets'
src: '**/*.styl'
dest: 'assets'
ext: '.css'
yuidoc:
compile:
name: 'Sample Project'
description: 'A sample project for testing YUIDoc themes'
version: '0.1.0'
url: 'http://example.com/'
options:
paths: ['sample/src']
outdir: 'sample/doc'
themedir: '.'
helpers: ['helpers/helpers.js']
copy:
assets:
expand: true
cwd: 'assets'
src: '**'
dest: 'sample/doc/assets'
watch:
options:
livereload: true
jade:
files: [
'layouts/**/*.jade'
'partials/**/*.jade'
]
tasks: ['jade']
yuidoc:
files: [
'**/*.handlebars'
'helpers/helpers.js'
'sample/**'
]
tasks: ['yuidoc']
stylus:
files: 'assets/**/*.styl'
tasks: ['stylus']
html:
files: '**/*.html'
assets:
files: [
'assets/**/*.jpg'
'assets/**/*.png'
'assets/**/*.gif'
'assets/**/*.css'
'assets/**/*.js'
]
tasks: ['copy:assets']
connect:
server:
options:
hostname: HOSTNAME
port: PORT
base: 'sample/doc'
directory: 'sample/doc'
livereload: true
open:
hack:
path: "http://#{HOSTNAME}:#{PORT}/"
grunt.initConfig config
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.loadNpmTasks 'grunt-contrib-stylus'
grunt.loadNpmTasks 'grunt-contrib-jade'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-contrib-yuidoc'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-open'
grunt.registerTask 'default', ['yuidoc']
grunt.registerTask 'hack', ['jade', 'stylus', 'yuidoc', 'connect:server', 'open:hack', 'watch']