Olo Gulp Build Helpers

0.9.1 · maintenance · verified Sun Apr 19

This package provides a collection of internal helper functions and configurations specifically designed for Olo's Gulp build pipeline, with a particular focus on bundling frontend assets for their ASP.NET applications. While the current reported version is 0.9.1, its public release history indicates releases up to 0.2.3. The package aims to streamline the integration of modern web technologies such as TypeScript, Webpack, Karma, Mocha, and Sinon into Olo's existing build infrastructure. Its release cadence is sporadic and tied to Olo's internal development needs, rather than following a public roadmap. As an internal utility, its primary differentiator is its tailored fit for Olo's specific project requirements and development environment, making it less of a general-purpose Gulp library and more of an opinionated, company-specific solution for build automation.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates a basic Gulpfile setup using `olo-gulp-helpers` to configure Webpack and define bundling and watch tasks for scripts and styles.

const gulp = require('gulp');
const { setupWebpack, defineBundlingTasks } = require('olo-gulp-helpers');

// Define paths for your project assets
const paths = {
  scripts: 'src/scripts/**/*.js',
  styles: 'src/styles/**/*.scss',
  output: 'dist'
};

// Setup Webpack configuration using Olo's helpers
const webpackConfig = setupWebpack({
  entry: './src/index.js',
  output: { path: paths.output, filename: 'bundle.js' },
  // Optionally pass environment variables, e.g., for API keys
  apiUrl: process.env.API_URL ?? '' 
});

// Define Gulp tasks using Olo's bundling helpers
const { compileScripts, compileStyles, watchFiles } = defineBundlingTasks(gulp, paths, webpackConfig);

// Export public tasks
exports.scripts = compileScripts;
exports.styles = compileStyles;
exports.watch = watchFiles;
exports.default = gulp.series(compileStyles, compileScripts, watchFiles);

view raw JSON →