-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
70 lines (61 loc) · 1.66 KB
/
gruntfile.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
module.exports = function (grunt) {
grunt.initConfig({
concat: {
options: {
separator: '\n\n//------------------------------------------\n',
banner: '//------------------ Concatenated Script -------------------\n'
},
dist: {
src: ['components/javascripts/*.js'],
dest: 'builds/development/javascripts/script.js'
}
}, // concat
bower_concat: {
all: {
dest: 'builds/development/javascripts/_bower.js',
cssDest: 'builds/development/stylesheets/_bower.css'
}
}, // bower_concat
sass: {
dist: {
options: {
style: 'compressed'
},
files: [{
src: 'components/sass/style.scss',
dest: 'builds/development/stylesheets/style.css'
}]
}
}, // scss
connect: {
server: {
options: {
port: 3000,
hostname: 'localhost',
base: 'builds/development/',
livereload: true
}
}
}, //connect
watch: {
options: {
spawn: false,
livereload: true
},
scripts: {
files: [
'builds/development/**/*.html',
'components/javascripts/**/*.js',
'components/sass/**/*.scss'
],
tasks: ['concat', 'sass']
}
} // watch
}); // initConfig
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-bower-concat');
grunt.registerTask('default', ['bower_concat', 'concat', 'sass', 'connect', 'watch']);
}; // Wrapper Function