-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
87 lines (73 loc) · 2.17 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
84
85
86
87
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
// start "bowercopy" task
bowercopy: {
/*
* Don't send messages to saying that Bower components aren't
* configured...ignore them instead. Also, Don't run any bower
* tasks when this task runs.
*/
options: {
ignore: ["gulp", "jquery"],
runBower: false
},
// Copy Bootstrap CCS over
bscss: {
// copy to the "css-build" directory
options: {
destPrefix: "css-build/"
},
files: {
"bootstrap.css": "bootstrap/dist/css/bootstrap.css"
}
}, // end "bowercopy:bscss" task
// Copy jQuery over
cycle2: {
// copy to the "css-build" directory
options: {
destPrefix: "build/js/libs/"
},
files: {
"jquery.cycle2.min.js": "jquery-cycle2/build/jquery.cycle2.min.js",
"jquery.cycle2.swipe.js": "jquery-cycle2/src/jquery.cycle2.swipe.js"
}
}, // end "bowercopy:jq" task
// Copy jQuery over
jq: {
// copy to the "css-build" directory
options: {
destPrefix: "build/js/libs/"
},
files: {
"jquery.min.js": "jquery/dist/jquery.min.js"
}
}, // end "bowercopy:jq" task
// Copy scrollNav over
scroll: {
// copy to the "css-build" directory
options: {
destPrefix: "build/js/libs/"
},
files: {
"jquery.scrollNav.min.js": "scrollNav/dist/jquery.scrollNav.min.js"
}
} // end "bowercopy:jq" task
}, // end "bowercopy" task
// start "critical" task
critical: {
build: {
options: {
base: './',
css:'build/css/styles.min.css',
width: 320,
height: 100
},
src: 'build/index.html',
dest: 'build/index.html'
}
}
});
grunt.loadNpmTasks("grunt-bowercopy");
grunt.loadNpmTasks('grunt-critical');
};