npm - how to integrate a lodash custom build into a project -


lodash supports custom builds subset of functionality / size. creating custom build breeze lodash-cli.

what's recommended way take custom build , integrate project? (using npm / browserify).

do create custom build command creates custom build , places somewhere? (where?)

is there canonical way specify dependency , integrate project?

there several approaches can take use subset of lodash:

  • use cli generate custom build (a file within projects codebase) of features need
  • use npm modules or lodash modules within code base (i.e. instead of doing _ = require('lodash'); _.each(...) each = require('lodash/collections/each'))
  • use lodash-modularize tool create , maintain custom lodash build given project , use lodash otherwise documented. automating two/three methods above.

each approach 100% valid , has pros , cons

disclaimer, i'm author of lodash-modularize


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -