-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
84 lines (74 loc) · 2.51 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
71
72
73
74
75
76
77
78
79
80
81
82
83
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
all:['Gruntfile.js','./dev/js/*.js']
},
uglify: {
dist: {
files: {
"./js/index.min.js":['./dev/js/*.js']
}
}
},
uncss: {
},
concurrent: {
},
sass:{
dist: {
options:{
style:"compressed",
banner:"/* Theme Name: IFMA Courses Theme\n URI: http://github.com/italy-portugal/IFMA-Courses \n Description: Theme for IFMA Courses Website \n Author: Jonathan Camara \n Author URI: http://www.ifma.org \n Version: 0.2.0 \n Tags: IFMA, white, bootstrap, responsive \n GitHub Theme URI: https://github.com/italy-portugal/IFMA-Courses \n GitHub Branch: develop \n */"
},
files:{
"./style.css":"./dev/scss/style.scss"
}
}
},
watch:{
config:{
files:['Gruntfile.js'],
tasks:['jshint'],
options:{
reload:true
}
},
scripts:{
files: ['./dev/js/*.js'],
tasks: ['jshint','uglify'],
options:{
livereload:true
}
},
css:{
files:['./dev/scss/*.scss'],
tasks:['sass'],
options:{
livereload: true
}
},
php:{
files:['./templates/*.php','*.php'],
options:{
livereload: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-uncss');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-contrib-sass'); //fully configured, may change the banner option in order to make compression easier.
grunt.loadNpmTasks('grunt-contrib-watch');
// grunt tasks: default, watch, dist, deploy
// default: run through all the configured tasks once
grunt.registerTask('default', ['jshint', 'uglify','sass']);
// watch: run tasks when a file change and live reload if possible
grunt.registerTask('devel',['watch']);
// dist: generate a non-development version that can be distributed separate from the codebase
// deploy: generate the correct files and push up to Github
};