rolldash
A rollup minifier for building minified builds of Lodash for Node.js
Last updated a year ago by flynnham .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rolldash 
SYNC missed versions from official npm registry.

Rolldash (Node 8+)

This module uses rollup to create a selectively minified build of lodash using npm scripts. This package was made in response to the deprecation of the official lodash-cli utility.

Usage

Installation

npm-script

npm i -D rolldash

CLI usage (npm-script)

rolldash [-v --version <latest|'4.0.0'>] [-c --config <path|'./rolldash.config.js'>] -o --output <path>

The above (as either an npm script) will do the following

  1. Fetches a local copy of Lodash of the specified version
  2. Reads the configuration file containing the regex/string names of valid Lodash exports
  3. The build script dynamically generates a build script in memory and uses it to build a selectively exported version of Lodash locally to the specified output location.

Example

rolldash -v 4.0.1 ./build/lodash.js

The above will fetch version 4.0.1 of Lodash, use rolldash.config.js in the current working directory, and output the file to ./build/lodash.js relative to the current working directory.

Configuration

The configuration file used by the build tool is specified by a simple module export of an object containing use with allows for both strings and regular expressions.

Example configuration file

module.exports = {
	compressor: {
		// uglifyJS2 settings
	},
	use: [
		'map',
		/difference/,
	],
};

The above will match any Lodash exports exactly named map, and any exports containing the word difference. The build script will output the detected exports when run.

Current Tags

  • 0.1.2                                ...           latest (a year ago)

1 Versions

  • 0.1.2                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (7)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |