Skip to content

Commit cb0a848

Browse files
committed
Configure Uglify to mangle prop names beginning with _
1 parent 25739a9 commit cb0a848

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Gruntfile.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,22 @@ module.exports = function(grunt) {
172172

173173
// Only preserve comments that start with (!)
174174
preserveComments: /^!/,
175+
176+
// Minify object properties that begin with _ ("private"
177+
// methods and values)
178+
mangleProperties: {
179+
regex: /^_/
180+
},
181+
175182
compress: {
183+
booleans: true,
184+
conditionals: true,
176185
dead_code: true,
186+
join_vars: true,
187+
pure_getters: true,
188+
sequences: true,
189+
unused: true,
190+
177191
global_defs: {
178192
'TEST': false
179193
}

0 commit comments

Comments
 (0)