This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
grunt.js
86 lines (82 loc) · 2.27 KB
/
grunt.js
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
// Default oBloq Grunt Tasks
// Modify to suit your project
// Requires grunt and grunt-contrib npm modules
// Todo: support server and globals separation
// Todo: default tasks for handlebars, stylus
//
// Note: expects to find oBloq files in bloqs subdirectory
// Will build (and erase each time) directories 'build', 'docs', and 'web'
module.exports = function(grunt){
grunt.initConfig({
clean: {
// Clean will recursively delete entire directories. Be careful
all: ['build','docs','web']
},
extract: {
build: ['bloqs/*.md', 'bloqs/**/*.md']
},
doc: {
docs: ['bloqs/*.md', 'bloqs/**/*.md']
},
lint: {
all: ['build/*.js', 'build/**/*.js']
},
jshint: {
options: {
browser: true
}
},
coffee:{
compile: {
files: {
'build/*.js': ['build/*.coffee', 'build/**/*.coffee'],
}
}
},
less: {
development: {
options: {
paths: ['build']
},
files: {
'build/*.css': 'build/*.less'
}
},
production: {
options: {
paths: ['build'],
yuicompress: true
},
files: {
'build/*.css': 'build/*.less'
}
}
},
copy: {
dist: {
files: {
'web/views/': ['build/*.html', 'build/**/*.html']
}
}
},
concat: {
js: {
src: ['build/*.js', 'build/**/*.js'],
dest: 'web/script.js'
},
css: {
src: ['build/*.css', 'build/**.css'],
dest: 'web/style.css'
}
},
min: {
dist:{
src: 'web/script.js',
dest: 'web/script.min.js'
}
}
});
grunt.loadNpmTasks('obloq');
grunt.loadNpmTasks('grunt-contrib');
grunt.registerTask('default', 'clean extract doc less coffee lint concat min');
};