-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
66 lines (65 loc) · 1.54 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
module.exports = function (grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
// Define the configuration for all the tasks
grunt.initConfig({
// Project settings
config: {
// Configurable paths
app: 'app'
},
// Watches files for changes and runs tasks based on the changed files
watch: {
livereload: {
options: {
livereload: {
key: '<%= connect.options.key %>',
cert: '<%= connect.options.cert %>'
}
},
files: [
'src/*.html',
'src/css/*.css',
'src/js/*.js',
]
}
},
// The actual grunt server settings
connect: {
options: {
port: 9000,
livereload: 35729,
hostname: '192.168.0.1',
protocol: 'https',
key: grunt.file.read('cert/localDevSite.key').toString(),
cert: grunt.file.read('cert/localDevSite.crt').toString(),
},
livereload: {
options: {
open: true,
base: ['src']
}
},
},
concat: {
options:{
separator: ';'
},
js:{
dest: 'src/js/vendor.js',
src: [
'node_modules/ismobilejs/isMobile.min.js',
'node_modules/qrious/dist/qrious.min.js',
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('serve', function (target) {
grunt.task.run([
'concat:js',
'connect:livereload',
'watch'
]);
});
};