From 7b3dda4e557ac08dd089fd587d7c916700c20a41 Mon Sep 17 00:00:00 2001 From: Ryan Shaw Date: Tue, 31 Oct 2017 14:23:23 -0600 Subject: [PATCH] clarify why we gulp rev a raw version of jquery MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: CORE-15 Test plan: * Add a custom JS file to your account in theme editor (e.g.: something like `console.log(‘this is jquery’, $)`) * Log out * Go to login screen from a mobile device (or you can cheat with http://localhost:3000/login/canvas?mobile=true) * make sure that your custom js gets loaded and that jquery does too Change-Id: I229609a353bc14db97318ef708dbfb46ca18113c Reviewed-on: https://gerrit.instructure.com/131374 Tested-by: Jenkins Reviewed-by: Clay Diffrient Product-Review: Ryan Shaw QA-Review: Ryan Shaw --- gulpfile.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 39c04b32c3a..a2d5aa19c6c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -40,7 +40,7 @@ gulp.task('rev', () => { const timezonesStream = gulp .src(timezoneFileGlobs, {base: './node_modules'}) .pipe(gulpTimezonePlugin()) - + const customTimezoneStream = gulp .src('./public/javascripts/custom_timezone_locales/*.js') .pipe(rename(path => path.dirname = '/timezone')) @@ -67,8 +67,11 @@ gulp.task('rev', () => { follow: true // follow symlinks, so it picks up on images inside plugins and stuff }), gulp.src([ - // this is used by the include_account_js call in mobile_auth.html.erb to make sure '$' is there for accounts' custom js files + // on the mobile login screen, we don't load any of our webpack js bundles. but if they + // have a custom js file, we do load a raw copy of jquery for their custom js to use. + // See `include_account_js` in mobile_auth.html.erb 'node_modules/jquery/jquery.js', + 'node_modules/tinymce/skins/lightgray/**/*', ], { base: '.'