add ENV var to skip js rev'ing in dev if you want

Change-Id: I7eb1413191d9b0ca0178459b96430c796334d11b
Reviewed-on: https://gerrit.instructure.com/72376
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
This commit is contained in:
Ethan Vizitei 2016-02-17 13:46:52 -07:00 committed by Ethan Vizitei
parent fe6f31b258
commit 9be656a7f7
2 changed files with 12 additions and 2 deletions

View File

@ -161,7 +161,11 @@ module.exports = {
new webpack.IgnorePlugin(/(CHANGELOG|LICENSE|README)$/),
new webpack.IgnorePlugin(/package.json/),
new WebpackOnBuildPlugin(function(stats){
child_process.spawn("gulp", ["rev"]);
if(process.env.SKIP_JS_REV){
console.log("skipping rev...");
}else{
child_process.spawn("gulp", ["rev"]);
}
}),
new webpack.PrefetchPlugin("./app/coffeescripts/calendar/ContextSelector.coffee"),
new webpack.PrefetchPlugin("./app/coffeescripts/calendar/TimeBlockRow.coffee"),

View File

@ -2,6 +2,7 @@ const gulp = require('gulp')
const gulpPlugins = require('gulp-load-plugins')()
const DIST = 'public/dist'
const STUFF_TO_REV = [
'public/fonts/**/*',
'public/images/**/*',
@ -38,7 +39,12 @@ const STUFF_TO_REV = [
gulp.task('rev', () => {
gulp.src(STUFF_TO_REV, {
var stuffToRev = STUFF_TO_REV;
if(process.env.SKIP_JS_REV){
// just get fonts and images
stuffToRev = STUFF_TO_REV.slice(0,2)
}
gulp.src(stuffToRev, {
base: 'public', // tell it to use the 'public' folder as the base of all paths
follow: true // follow symlinks, so it picks up on images inside plugins and stuff
})