This repository was archived by the owner on Jan 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgruntfile.js
More file actions
57 lines (55 loc) · 1.6 KB
/
gruntfile.js
File metadata and controls
57 lines (55 loc) · 1.6 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
module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jsbeautifier: {
files: ["public/scripts/visualization.js", "public/stylesheets/custom/*.css", "!public/stylesheets/custom/*.min.css"],
options: {
css: {
indentChar: " ",
indentSize: 2
},
js: {
braceStyle: "collapse",
breakChainedMethods: false,
e4x: false,
evalCode: false,
indentChar: " ",
indentLevel: 0,
indentSize: 2,
indentWithTabs: false,
jslintHappy: false,
keepArrayIndentation: false,
keepFunctionIndentation: false,
maxPreserveNewlines: 1000,
preserveNewlines: true,
spaceBeforeConditional: true,
spaceInParen: false,
unescapeStrings: false,
wrapLineLength: 0
}
}
},
uglify: {
my_target: {
files: {
'public/scripts/visualization.min.js': ['public/scripts/visualization.js']
}
}
},
cssmin: {
target: {
files: [{
expand: true,
cwd: 'public/stylesheets/custom',
src: ['*.css', '!*.min.css'],
dest: 'public/stylesheets/custom-compress',
ext: '.min.css'
}]
}
}
});
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['jsbeautifier', 'uglify', 'cssmin']);
}