forked from cascadiajs/2012.cascadiajs.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grunt.js
90 lines (85 loc) · 1.95 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
87
88
89
90
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
meta: {
version: '0.1.0',
banner: '/*! CascadisJS - v<%= meta.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* http://cascadiajs.com/\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> ' +
'CascadiaJS; Licensed MIT */'
},
lint: {
files: ['asset/js/*.js']
},
concat: {
dist: {
src: ['asset/js/*.js'],
dest: 'asset/js/compiled/site.js'
}
},
min: {
dist: {
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
dest: 'asset/js/compiled/site.min.js'
}
},
watch: {
files: ['<config:lint.files>', 'asset/css/scss/*.scss', 'index.html'],
tasks: 'compass:build lint concat min reload'
},
compass: {
build: {
src: 'asset/css/scss',
dest: 'asset/css',
outputstyle: 'compressed',
linecomments: false,
forcecompile: true
}
},
reload: {
port: 35729,
liveReload: {},
proxy: {
host: 'localhost',
port: 8000
}
},
img: {
png: {
src: ['asset/img/*.png']
}
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
browser: true,
devel: true
},
globals: {
jQuery: true,
$: true
}
},
uglify: {}
});
// Default task.
grunt.registerTask('default', 'server open-browser reload watch');
grunt.registerTask('build', 'compass lint concat min img');
grunt.registerTask('open-browser', function() {
var open = require('open');
open( 'http://localhost:8000' );
});
// Extra Tasks
grunt.loadTasks('asset/grunt');
};