-
Notifications
You must be signed in to change notification settings - Fork 49
/
Gruntfile.js
78 lines (69 loc) · 1.84 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
/**
* Build process for CKEditor AutoSave Plugin
* This file contributed by Timm Stokke <timm@stokke.me>
*
* Don't know where to start?
* Try: http://24ways.org/2013/grunt-is-not-weird-and-hard/
*/
module.exports = function(grunt) {
// CONFIGURATION
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
// Minimize JS
uglify: {
difflib: {
options: {
sourceMap: false,
output: { beautify: true },
mangle: false,
compress: false
},
src: [
"autosave/js/difflib.js",
"autosave/js/diffview.js",
"autosave/js/jsdiff.js",
"node_modules/moment/min/moment-with-locales.js",
"node_modules/lz-string/libs/lz-string.js"
],
dest: "autosave/js/extensions.js"
},
minify: {
files: {
"autosave/js/extensions.min.js": "autosave/js/extensions.js"
}
}
},
// CSS Minify
cssmin: {
combine: {
files: {
"autosave/css/autosave.min.css": "autosave/css/autosave.css",
}
}
},
devUpdate: {
main: {
options: {
reportUpdated: true,
updateType: "force",
semver: false
}
}
}
});
// PLUGINS
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-cssmin");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("@w8tcha/grunt-dev-update");
grunt.registerTask("watch",
[
"uglify",
"cssmin"
]);
grunt.registerTask("default", [
"devUpdate",
"uglify",
"cssmin"
]);
};