Skip to content

Commit 35b44fc

Browse files
committed
browserify instead of uglify
1 parent b3d1871 commit 35b44fc

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Gruntfile.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ module.exports = function (grunt) {
55
eslint: {
66
target: ['Standards/**/*.js', 'Contrib/PhantomJS/*.js']
77
},
8+
browserify:{
9+
dist:{
10+
src: ['index.js'],
11+
dest: 'build/HTMLCS.js',
12+
options:{
13+
browserifyOptions: {
14+
debug: true
15+
},
16+
require: [
17+
],
18+
}
19+
}
20+
},
821
uglify: {
922
debug: {
1023
options: {
@@ -71,6 +84,8 @@ module.exports = function (grunt) {
7184
grunt.file.setBase('./');
7285
require('load-grunt-tasks')(grunt);
7386

87+
grunt.loadNpmTasks('grunt-browserify');
88+
7489
grunt.registerTask('default', ['eslint']);
7590
grunt.registerTask('build', ['exportVars', 'uglify:dist', 'copy:dist']);
7691
grunt.registerTask('build-bookmarklet', ['exportVars', 'uglify:bookmarklet', 'copy:dist']);
@@ -91,5 +106,5 @@ module.exports = function (grunt) {
91106
grunt.file.write('Standards/all.js', catted, { encoding: 'utf8' })
92107
});
93108

94-
return grunt.registerTask('build-debug', ['exportVars', 'uglify:debug', 'copy:dist']);
109+
return grunt.registerTask('build-debug', ['exportVars', 'browserify:dist', 'copy:dist']);
95110
};

HTMLCS.Util.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* +--------------------------------------------------------------------+
1111
*
1212
*/
13+
HTMLCS = HTMLCS || {}
14+
1315
HTMLCS.util = function() {
1416
var self = {};
1517

0 commit comments

Comments
 (0)