Customize the build
Select the plugins you want and rebuild AbrantesPlus with gulp.
How the build works
AbrantesPlus.js is created by concatenating Abrantes.js with the plugin
files listed in gulpfile.js.
You should use the minified Abrantes and use the file AbrantesPlus.min.js. Or if you prefer the ES6 module version, use AbrantesPlusMod.min.js.
1. Select plugins
Edit the src list in gulpfile.js to include or remove plugins.
const myBuild = [
'Abrantes.js',
'plugins/ga4-gtag.js',
// 'plugins/matomo.js',
'plugins/hotjar.js',
// 'plugins/clarity.js',
'plugins/formtrack.js',
'plugins/add2DL.js',
'plugins/log.js',
'plugins/seed.js',
'plugins/hubspot.js',
];
2. Run gulp tasks
- Install dependencies with
npm install. - Build and minify the bundle with
npx gulp.
npm install
npx gulp
Output files
The classic files are written to the repository root as AbrantesPlus.js and
AbrantesPlus.min.js. Sourcemap files are also generated for debugging.
The ES6 module files are written as AbrantesPlusMod.js and
AbrantesPlusMod.min.js. It also generates a sourcemap file for debugging. See the module example for more information.