Skip to content

Commit

Permalink
optimized minification
Browse files Browse the repository at this point in the history
also removed stub for sourcemap generation.
too complicated and too little benefit.
  • Loading branch information
janpaepke committed Jan 21, 2015
1 parent 6b36003 commit 3f026c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 0 additions & 2 deletions dev/todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

# Build (gulpfile.js)
- make jsdoc generation properly & repair docs
- make sourcemaps task
– optimize minification

# Test
- cross browser test scrollPosition getter functions
Expand Down
26 changes: 14 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,19 @@ gulp.task('build:minified', ['lint:source', 'clean:minified'], function() {
}
]
}))
.pipe(uglify())
.pipe(uglify({
output: {
screw_ie8 : true
},
compress: {
unsafe: true,
screw_ie8 : true,
hoist_vars: false // default is false - true would make code technically more correct, but increases gzip size
},
mangle: {
screw_ie8 : true
},
}))
.pipe(concat.header(options.banner.minified))
.pipe(replace(options.replaceVars))
.pipe(gulp.dest(options.folderOut + "/" + options.subfolder.minified));
Expand Down Expand Up @@ -299,16 +311,6 @@ gulp.task('test', ['build:uncompressed', 'build:minified'], function () {
});
});

gulp.task('generate:sourcemaps-uncompressed', ['build:uncompressed'], function () {
// TODO: generate sourcemaps
log.warn("sourcemaps not yet implemented");
});
gulp.task('generate:sourcemaps-minified', ['build:minified'], function () {
// TODO: generate sourcemaps
log.warn("sourcemaps not yet implemented");
});
gulp.task('generate:sourcemaps', ['generate:sourcemaps-uncompressed', 'generate:sourcemaps-minified']);

gulp.task('travis-ci', ['build:uncompressed', 'build:minified', 'test']);

gulp.task('development', ['build:uncompressed', 'generate:sourcemaps-uncompressed']);
gulp.task('development', ['build:uncompressed']);

0 comments on commit 3f026c7

Please sign in to comment.