Skip to content

Commit

Permalink
Fixed minification issue
Browse files Browse the repository at this point in the history
  • Loading branch information
abuturla committed Sep 11, 2017
1 parent 6dca307 commit 5d2d042
Show file tree
Hide file tree
Showing 4 changed files with 2,181 additions and 14 deletions.
48 changes: 48 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
var gulp = require('gulp');
var runSequence = require('run-sequence');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');

//Minify files, and bundle together
gulp.task('bundle1_step1', function(){
var sdkBundle1 = [
"scripts/angular/ng-infinite-scroll.custom.js",
"scripts/owlCarousel/owlCarousel.js",
"scripts/buildfire/components/carousel/carousel.js"
];

return gulp.src(sdkBundle1, {base: '.'})

/// obfuscate and minify the JS files
.pipe(uglify())

/// merge all the JS files together. If the
.pipe(concat('bundle1.min.js'))

///output here
.pipe(gulp.dest('scripts/_bundles'));
});

//Concat the remaining files
gulp.task('bundle1_step2', function(){
var sdkBundle1 = [
"scripts/buildfire.js",
"scripts/jquery/jquery-1.11.2.min.js",
"scripts/angular/angular.min.js",
"scripts/angular/ui-bootstrap.min.js",
"scripts/jquery/jquery-ui.min.js",
"scripts/_bundles/bundle1.min.js"
];

return gulp.src(sdkBundle1, {base: '.'})

/// merge all the JS files together.
.pipe(concat('bundle1.min.js'))

///output here
.pipe(gulp.dest('scripts/_bundles'));
});

gulp.task('build', function(callback){
runSequence('bundle1_step1', 'bundle1_step2', callback);
});
22 changes: 13 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,27 @@
"author": "Daniel Hindi",
"license": "ISC",
"devDependencies": {
"body-parser": "1.11.0",
"chai": "^3.3.0",
"jasmine-core": "^2.3.4",
"express": "4.0.0",
"gulp": "^3.9.1",
"gulp-concat": "^2.6.1",
"gulp-uglify": "^3.0.0",
"jasmine-core": "^2.8.0",
"karma": "^0.13.10",
"karma-chai": "^0.1.0",
"karma-jasmine": "^0.3.6",
"karma-coverage": "^0.5.1",
"karma-junit-reporter": "^0.3.3",
"karma-chrome-launcher": "^0.2.1",
"karma-coverage": "^0.5.1",
"karma-firefox-launcher": "^0.1.6",
"karma-ie-launcher": "^0.2.0",
"karma-safari-launcher": "^0.1.1",
"karma-jasmine": "^0.3.6",
"karma-junit-reporter": "^0.3.3",
"karma-mocha": "^0.2.0",
"karma-phantomjs-launcher": "^0.2.1",
"karma-safari-launcher": "^0.1.1",
"mocha": "^2.2.5",
"karma-mocha": "^0.2.0",
"phantom": "0.8.4",
"phantomjs": "^1.9.17",
"express": "4.0.0",
"body-parser": "1.11.0",
"phantom": "0.8.4"
"run-sequence": "^2.1.0"
}
}
Loading

0 comments on commit 5d2d042

Please sign in to comment.