6 – External Libraries

Including external JavaScript libraries is as simple as installing the npm script and including it in the gulpfile.js

/* -------------------------------------------------------------------------------------------------
Header & Footer JavaScript Boundles
-------------------------------------------------------------------------------------------------- */

const headerJS = [
    'node_modules/jquery/dist/jquery.js',
    'node_modules/nprogress/nprogress.js',
    'node_modules/aos/dist/aos.js',
    'node_modules/isotope-layout/dist/isotope.pkgd.js'
];
const footerJS = [
    'src/js/**'
];
//--------------------------------------------------------------------------------------------------

You can include the scripts in the head of the page before the DOM is loaded by placing them in the headerJS array or in the footer of the page after the DOM is loaded in the footerJS array. Only footer scripts are processed with Babel thus supporting ES6, however you can change this in the configuration if you want to run both header and footer scripts with Babel.

A build restart is required for changes to take effect.

Continue to:
7 – Build Backups