-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathGruntfile.js
More file actions
79 lines (78 loc) · 1.77 KB
/
Gruntfile.js
File metadata and controls
79 lines (78 loc) · 1.77 KB
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
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
pkg : grunt.file.readJSON('package.json'),
watch : {
sass : {
files : ['library/styles/**/*.{scss,sass}'],
tasks : ['sass:dist'],
options: {
nospawn: false
}
},
livereload: {
files : [
'library/views/**/*.{html,php}',
// 'app/index.html',
// '.tmp/styles/app.css',
'library/includes/**/*.php',
'*.php',
'page-templates/*.php',
'library/scripts/**/*.{js,json}',
'library/css/app.css',
'library/images/**/*.{png,jpg,jpeg,gif,webp,svg}'],
options: {
livereload: true
}
}
},
sass : {
dev : {
options: {
sourceComments: 'none',
outputStyle : 'expanded'
},
files : {
// '.tmp/styles/app.css': 'app/styles/app.scss'
'library/css/app.css': 'library/styles/app.scss'
}
},
dist: {
options: {
sourceComments: 'normal',
outputStyle : 'expanded'
},
files : {
'library/css/app.css': 'library/styles/app.scss'
}
}
}, open: {
server: {
url: 'http://angularpress.localhost'
// url: 'http://localhost:8001'
}
},
clean : {
dist : {
files: [
{
dot: true,
src: [
'.tmp',
'<%= yeoman.dist %>/*',
'!<%= yeoman.dist %>/.git*'
]
}
]
},
server: '.tmp'
}
});
grunt.registerTask('default', ['clean:server', 'open', 'watch']);
grunt.registerTask('server', ['clean:server', 'sass:dev', 'open', 'watch']);
grunt.registerTask('build', ['clean:server', 'sass:dist', 'open', 'watch']);
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
};