add comment for how to vendorize a library sourced from a node module
authorDan Allen <dan@opendevise.com>
Fri, 15 May 2020 09:25:03 +0000 (03:25 -0600)
committerDan Allen <dan@opendevise.com>
Fri, 15 May 2020 09:26:37 +0000 (03:26 -0600)
gulp.d/tasks/build.js

index 5894cc1..d6ff379 100644 (file)
@@ -92,6 +92,8 @@ module.exports = (src, dest, preview) => () => {
       )
       .pipe(buffer())
       .pipe(uglify()),
+    // NOTE use this statement to bundle a JavaScript library that cannot be browserified, like jQuery
+    //vfs.src(require.resolve('<package-name-or-require-path>'), opts).pipe(concat('js/vendor/<library-name>.js')),
     vfs
       .src('css/site.css', { ...opts, sourcemaps })
       .pipe(postcss((file) => ({ plugins: postcssPlugins, options: { file } }))),