-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGruntfile.coffee
More file actions
38 lines (36 loc) · 1.06 KB
/
Copy pathGruntfile.coffee
File metadata and controls
38 lines (36 loc) · 1.06 KB
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
module.exports = (grunt) ->
grunt.initConfig
concurrent:
options: logConcurrentOutput: true
lint: ["stylint", "puglint"]
build: ["stylus", "pug"]
pug:
options:
pretty: true
filters:
img2obj: (text) -> text.replace(
/<img .*src=(.+?)>/g,
"<object type=\"image/svg+xml\" data=$1></object>"
)
dist: files: [
expand: true
cwd: "views"
src: ["**/*.pug", "!_mixins.pug"]
dest: "build"
ext: ".html"
]
puglint: pug:
options: extends: ".pug-lintrc.json"
src: ["views/**/*.pug"]
stylus: compile:
options: compress: true
files:
"build/styles/main.css": "stylus/main.styl"
"build/styles/sciadv.css": "stylus/sciadv.styl"
stylint:
options: configFile: ".stylintrc.json"
src: ["stylus/*.styl"]
Object.keys((require "./package").devDependencies).filter (dep) =>
grunt.task.loadNpmTasks dep if dep.startsWith "grunt-"
grunt.registerTask "default", ["concurrent:build"]
return