Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

Commit

Permalink
Add bundle-collapser
Browse files Browse the repository at this point in the history
  • Loading branch information
ooflorent committed Aug 14, 2014
1 parent 65f5fed commit 268b3e9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 1.0.0

- Updated dependencies
- Added [`bundle-collapser`](https://github.com/substack/bundle-collapser) to better compress `browserify`-d JavaScript
- Added `CHANGELOG.md`
- Fix watching on LESS files


# 0.1.0

- First release
10 changes: 7 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ program.on('--help', function(){

program
.usage('<task> [options]')
.option('-p, --prod', 'generate production assets')
.option('-P, --prod', 'generate production assets')
.parse(process.argv);

var prod = !!program.prod;
Expand All @@ -42,8 +42,12 @@ gulp.task('default', function() {
gulp.task('build', ['build_source', 'build_index', 'build_styles']);

gulp.task('build_source', function() {
return browserify()
.add('./src/main.js')
var bundler = browserify('./src/main', {debug: !prod});
if (prod) {
bundler.plugin(require('bundle-collapser/plugin'));
}

return bundler
.bundle()
.on('error', browserifyError)
.pipe(source('build.js'))
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
{
"private": true,
"name": "js13k-boilerplate",
"version": "0.1.0",
"version": "1.0.0",
"description": "JS13KGames boilerplate",
"author": "Florent Cailhol <[email protected]>",
"license": "MIT",
"repository": "ooflorent/js13k-boilerplate",
"devDependencies": {
"browserify": "^5.9.1",
"browserify": "^5.10.0",
"bundle-collapser": "^1.1.0",
"chalk": "^0.5.1",
"commander": "^2.3.0",
"gulp": "^3.8.6",
"gulp": "^3.8.7",
"gulp-buffer": "0.0.2",
"gulp-concat": "^2.3.4",
"gulp-cssmin": "^0.1.6",
"gulp-eslint": "^0.1.8",
"gulp-htmlmin": "^0.1.3",
"gulp-if": "^1.2.4",
"gulp-less": "^1.3.2",
"gulp-less": "^1.3.3",
"gulp-micro": "^1.0.0",
"gulp-size": "^1.0.0",
"gulp-uglify": "^0.3.1",
"gulp-util": "^3.0.0",
"gulp-zip": "^0.4.0",
"gulp-zip": "^1.0.0",
"rimraf": "^2.2.8",
"vinyl-source-stream": "^0.1.1"
}
Expand Down

0 comments on commit 268b3e9

Please sign in to comment.