OneLittleRobot / gulp-lodash-builder

A tool to create a custom Lodash File

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gulp-lodash-builder

A tool to create a customised version of lodash

Usage

Install gulp-lodash-builder as a development dependency:

$ npm install --save-dev gulp-lodash-builder

Then, add it to your gulpfile.js:

Gulp Example

var gulp = require('gulp');
var lodashBuilder = require('gulp-lodash-builder');

var options = {
  target: "/assets/javascript/vendor/lodash.custom.js",
  build: 'compat',
  settings: {}
};
gulp.task('lodash', function (cb) {
  return gulp.src("/assets/javascript/src/**", {buffer: false})
    .pipe(lodashBuilder(options))
    .on('error', function (err) {
      console.log('err: ', err)
    })
});

Options

target

String - Where to output the custom build lodash file.

build

String - Which custom lodash build to use. Build types: compat, modern, strict, modularize. See Lodash Custom Builds for details on build options.

settings

Object - Sent to Lodash CLI as settings for precompiling templates. See Lodash Custom Builds for more details.

About

A tool to create a custom Lodash File

License:MIT License


Languages

Language:JavaScript 100.0%