This repository has been archived by the owner on Jun 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Gruntfile.coffee
123 lines (107 loc) · 3.5 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
###
jade-bootstrap
https://github.com/metalshark/jade-bootstrap
Copyright (c) 2013 'Metalshark' Beech Horn
Licensed under the LGPL v3 license.
###
'use strict'
# http://gruntjs.com/api/grunt
# Grunt exposes all of its methods and properties on the grunt object that gets
# passed into the module.exports function exported in your Gruntfile.
module.exports = (grunt) ->
# load all grunt tasks
require('load-grunt-tasks') grunt
# Project configuration.
grunt.initConfig
jadeStylus:
mixins: 'mixins'
temp: '.tmp'
tests: 'tests'
# grunt-contrib-clean: https://github.com/gruntjs/grunt-contrib-clean
# Clear files and folders.
clean:
temp:
dot: true
src: '<%= jadeStylus.temp %>'
# grunt-contrib-coffee: https://github.com/gruntjs/grunt-contrib-coffee
# Compile CoffeeScript files to JavaScript.
coffee:
gruntfile:
files: [
'<%= jadeStylus.temp %>/Gruntfile.js': 'Gruntfile.coffee'
]
# grunt-coffeelint: https://github.com/vojtajina/grunt-coffeelint
# Lint your CoffeeScript using grunt.js and coffeelint.
coffeelint:
options:
indentation:
value: 4
max_line_length:
value: 120
all: 'Gruntfile.coffee'
# grunt-html5compare: https://github.com/metalshark/grunt-html5compare
# Compares HTML 5 files for equivalence.
html5compare:
tests:
files: [
expand: true
nonull: true
cwd: '<%= jadeStylus.tests %>'
src: '**/*.html'
dest: '<%= jadeStylus.temp %>'
ext: '.html'
]
# grunt-contrib-jade: https://github.com/gruntjs/grunt-contrib-jade
# Compile Jade templates.
jade:
options:
pretty: true
tests:
options:
compileDebug: true
files: [
expand: true
cwd: '<%= jadeStylus.tests %>'
src: '**/*.jade'
dest: '<%= jadeStylus.temp %>'
ext: '.html'
]
# grunt-contrib-jshint: https://github.com/gruntjs/grunt-contrib-jshint
# Validate files with JSHint.
jshint:
all: '<%= jadeStylus.temp %>/Gruntfile.js'
options:
jshintrc: '.jshintrc'
# grunt-contrib-watch: https://github.com/gruntjs/grunt-contrib-watch
# Run predefined tasks whenever watched file patterns are added, changed or deleted.
watch:
jade:
files: [
'<%= jadeStylus.tests %>}**/*.jade'
'index.jade'
]
tasks: ['newer:jade']
html:
files: [
'<%= jadeStylus.temp %>}**/*.html'
]
tasks: ['html5compare']
grunt.registerTask 'default', [
#'clean'
'newer:coffeelint'
'newer:coffee'
'newer:jshint'
'test'
]
grunt.registerTask 'dev', [
'newer:coffeelint'
'newer:coffee'
'newer:jshint'
'newer:jade'
'watch:jade'
]
grunt.registerTask 'test', [
#'clean'
'newer:jade'
'html5compare'
]