Skip to content

Commit

Permalink
shrinking the heroku slug size
Browse files Browse the repository at this point in the history
  • Loading branch information
perrygovier committed Jan 23, 2017
1 parent cdd3047 commit 0ccfcce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .slugignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
assets/img/
6 changes: 6 additions & 0 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var cache = require('gulp-cache');
var cachebust = require('gulp-cache-bust');
var concat = require('gulp-concat');
var cp = require('child_process');
var del = require('del');
var es = require('event-stream');
var footer = require('gulp-footer');
var header = require('gulp-header');
Expand All @@ -18,6 +19,7 @@ var sass = require('gulp-sass');
var server = require('gulp-develop-server');
var shell = require('gulp-shell');
var uglify = require('gulp-uglify');
var del = require('del');

var bustingCache = false;

Expand Down Expand Up @@ -412,6 +414,10 @@ gulp.task('build.clean', ['build-prep'], function(done) {
})
});

gulp.task('slug.prep', function () {
return del(['assets', 'content']);
});

gulp.task('build-prep', ['ionicons', 'cli-docs', 'styles:v1', 'styles:v2', 'images', 'js', 'docs.index'], bustCache);

gulp.task('default', ['build']);
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Ionic Framework main site - IonicFramework.com",
"main": "Gulpfile.js",
"scripts": {
"heroku-postbuild": "gulp build.clean"
"heroku-postbuild": "gulp build.clean && gulp slug.prep"
},
"engines": {
"node": "6.9.2"
Expand All @@ -27,6 +27,7 @@
"browser-sync": "^1.3.7",
"compression": "^1.4.6",
"cookie-parser": "^1.4.3",
"del": "^2.2.2",
"event-stream": "^3.3.1",
"express": "^4.12.3",
"express-ab": "^0.7.0",
Expand Down

0 comments on commit 0ccfcce

Please sign in to comment.