Skip to content

Commit

Permalink
Clean up JS deps, Gulpfile, Webpack Encore
Browse files Browse the repository at this point in the history
- JS concatenation and Uglifying is being left up to Webpack Encore for
  all new JS, so strip it from Gulp and npm deps
  • Loading branch information
allejo committed Sep 11, 2017
1 parent 8e6dd33 commit 1922f4e
Show file tree
Hide file tree
Showing 5 changed files with 2,622 additions and 2,159 deletions.
55 changes: 3 additions & 52 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var gulp = require('gulp');
var pump = require('pump');
var util = require('gulp-util');
var uglify = require('gulp-uglify');


///
Expand Down Expand Up @@ -94,21 +93,13 @@ gulp.task('dev:watch:sassdocs', function () {
// JS Functionality
///

gulp.task('js:concat', function (cb) {
var concat = require('gulp-concat');

pump([
gulp.src('web/assets/js/partials/*.js'),
concat('utilities.js'),
gulp.dest('web/assets/js/')
], cb);
});

gulp.task('js:hint', function (cb) {
var jshint = require('gulp-jshint');

pump([
gulp.src([
'assets/js/src/*.js',
'assets/js/*.js',
'Gulpfile.js',
'web/assets/js/*.js',
'web/assets/js/partials/*.js'
Expand All @@ -124,46 +115,6 @@ gulp.task('js:hint', function (cb) {
], cb);
});

gulp.task('js:modernizr', function (cb) {
var modernizr = require('gulp-modernizr');

pump([
gulp.src('web/assets/js/*.js'),
modernizr({
"crawl": true,
"customTests": [],
"tests": [
"canvas",
"canvastext",
"svg",
"cssanimations",
"csscalc",
"csstransforms",
"csstransitions",
"cssvhunit",
"inlinesvg"
],
"options": [
"setClasses"
]
}),
uglify(),
gulp.dest('web/assets/js/min/')
], cb);
});

gulp.task('js:uglify', function (cb) {
pump([
gulp.src([
'web/assets/js/*.js',
'!web/assets/js/min/*.js'
]),
uglify(),
gulp.dest('web/assets/js/min/')
], cb);
});


///
// Sass Functionality
///
Expand Down Expand Up @@ -239,6 +190,6 @@ gulp.task('sass:test', function(cb) {
///

gulp.task('dev', ['sass:dev', 'dev:watch']);
gulp.task('dist', ['assets:sprites', 'assets:responsive', 'sass:dist', 'js:concat', 'js:uglify', 'js:modernizr']);
gulp.task('dist', ['assets:sprites', 'assets:responsive', 'sass:dist']);

gulp.task('default', ['dev']);
33 changes: 17 additions & 16 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1922f4e

Please sign in to comment.