-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
62 lines (55 loc) · 1.57 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
module.exports = function(grunt) {
// Load Grunt tasks declared in the package.json file
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
//GOT IT FROM HERE: http://thecrumb.com/2014/03/15/using-grunt-for-live-reload/
grunt.initConfig({
// Grunt express - our webserver
// https://github.com/blai/grunt-express
express: {
all: {
options: {
server: "server.js",
bases: ['C:\\Git\\TrailFinder\\app'],
//bases: ['Sites/Trailfinder'],
port: 8080,
hostname: "0.0.0.0",
livereload: true
}
}
},
sass: {
dist: {
files: {
'app/css/app.css': 'app/sass/app.scss'
}
}
},
cssmin: {
combine: {
files: {
'app/css/app.min.css': ['app/css/app.css']
}
}
},
// grunt-watch will monitor the projects files
// https://github.com/gruntjs/grunt-contrib-watch
watch: {
all: {
files: ['app/*.html', 'app/sass/*.scss'],
tasks: ['sass', 'cssmin'],
options: {
livereload: true
}
}
},
// grunt-open will open your browser at the project's URL
// https://www.npmjs.org/package/grunt-open
open: {
all: {
path: 'http://localhost:8080/index.html'
}
}
});
grunt.registerTask('build', ['sass', 'cssmin']);
grunt.registerTask('default', ['build', 'express', 'open', 'watch']);
};