Remove modernizr

This commit is contained in:
Kevin MacMartin 2017-09-26 13:19:35 -04:00
parent fdec3a44f6
commit b15d7cced9
4 changed files with 2 additions and 26 deletions

23
gulpfile.js vendored
View file

@ -6,7 +6,6 @@ const gulp = require("gulp"),
gConcat = require("gulp-concat"), gConcat = require("gulp-concat"),
gPlumber = require("gulp-plumber"), gPlumber = require("gulp-plumber"),
gUglify = require("gulp-uglify"), gUglify = require("gulp-uglify"),
gModernizr = require("gulp-modernizr"),
gBabel = require("gulp-babel"), gBabel = require("gulp-babel"),
gPostCSS = require("gulp-postcss"), gPostCSS = require("gulp-postcss"),
gStripDebug = require("gulp-strip-debug"), gStripDebug = require("gulp-strip-debug"),
@ -15,11 +14,10 @@ const gulp = require("gulp"),
// determine if gulp has been run with --production // determine if gulp has been run with --production
const prod = gUtil.env.production; const prod = gUtil.env.production;
// declare plugin settings and modernizr tests // declare plugin settings
const sassOutputStyle = prod ? "compressed" : "nested", const sassOutputStyle = prod ? "compressed" : "nested",
sassIncludePaths = [ "bower_components" ], sassIncludePaths = [ "bower_components" ],
autoprefixerSettings = { remove: false, cascade: false, browsers: [ "last 6 versions" ] }, autoprefixerSettings = { remove: false, cascade: false, browsers: [ "last 6 versions" ] };
modernizrTests = [];
// javascript files for the public site // javascript files for the public site
const jsPublic = [ const jsPublic = [
@ -123,23 +121,6 @@ gulp.task("fonts", function() {
.pipe(gulp.dest("public/fonts/")); .pipe(gulp.dest("public/fonts/"));
}); });
// gulp task for modernizr
gulp.task("modernizr", function() {
const modernizr = gulp.src([ "public/js/lib.js", "public/js/app.js", "public/css/app.css" ])
.pipe(gModernizr({
tests: modernizrTests,
excludeTests: [ "hidden" ],
crawl: false,
options: [ "setClasses", "addTest", "html5printshiv", "testProp", "fnBind" ]
}))
.pipe(gPlumber(plumberError))
.pipe(gConcat("modernizr.js"));
// minify if running gulp with --production
if (prod) { modernizr.pipe(gUglify()); }
return modernizr.pipe(gulp.dest("public/js/"));
});
// gulp watch task // gulp watch task
gulp.task("watch", function() { gulp.task("watch", function() {
const gLiveReload = require("gulp-livereload"); const gLiveReload = require("gulp-livereload");

View file

@ -96,9 +96,6 @@ bower prune && bower install || error "${c_m}bower prune && bower install$c_w ex
msg "Running: ${c_m}gulp --production" msg "Running: ${c_m}gulp --production"
gulp --production || error "${c_m}gulp --production$c_w exited with an error status" gulp --production || error "${c_m}gulp --production$c_w exited with an error status"
msg "Running: ${c_m}gulp modernizr --production"
gulp modernizr --production || error "${c_m}gulp modernizr --production$c_w exited with an error status"
(( artisan_down )) && { (( artisan_down )) && {
msg "Running: ${c_m}php artisan up" msg "Running: ${c_m}php artisan up"
php artisan up php artisan up

View file

@ -14,7 +14,6 @@
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-babel": "^7.0.0", "gulp-babel": "^7.0.0",
"gulp-concat": "^2.6.1", "gulp-concat": "^2.6.1",
"gulp-modernizr": "^1.0.0-alpha",
"gulp-plumber": "^1.1.0", "gulp-plumber": "^1.1.0",
"gulp-postcss": "^7.0.0", "gulp-postcss": "^7.0.0",
"gulp-sass": "^3.1.0", "gulp-sass": "^3.1.0",

View file

@ -1,7 +1,6 @@
@extends('layouts.base') @extends('layouts.base')
@section('page-includes') @section('page-includes')
<script src="/js/modernizr.js?version={{ env('CACHE_BUST') }}"></script>
<script src="/js/lib.js?version={{ env('CACHE_BUST') }}"></script> <script src="/js/lib.js?version={{ env('CACHE_BUST') }}"></script>
<script src="/js/app.js?version={{ env('CACHE_BUST') }}"></script> <script src="/js/app.js?version={{ env('CACHE_BUST') }}"></script>
<link rel="stylesheet" href="/css/app.css?version={{ env('CACHE_BUST') }}" /> <link rel="stylesheet" href="/css/app.css?version={{ env('CACHE_BUST') }}" />