diff options
author | Michaƫl Zasso <mic.besace@gmail.com> | 2016-01-12 20:50:19 +0100 |
---|---|---|
committer | Roman Reiss <me@silverwind.io> | 2016-01-13 23:15:39 +0100 |
commit | 2d441493a4a46a511ba1bdf93e442c3288fbe92d (patch) | |
tree | c649c3aa100a57ff38ed267e3a5e5bba7ac8d961 /tools/eslint/node_modules/center-align/utils.js | |
parent | ed55169834a3ce16a271def9630c858626ded34d (diff) | |
download | node-new-2d441493a4a46a511ba1bdf93e442c3288fbe92d.tar.gz |
tools: update eslint to v1.10.3
PR-URL: https://github.com/nodejs/io.js/pull/2286
Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'tools/eslint/node_modules/center-align/utils.js')
-rw-r--r-- | tools/eslint/node_modules/center-align/utils.js | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/center-align/utils.js b/tools/eslint/node_modules/center-align/utils.js new file mode 100644 index 0000000000..aead6d2f08 --- /dev/null +++ b/tools/eslint/node_modules/center-align/utils.js @@ -0,0 +1,40 @@ +'use strict'; + +/** + * Lazily-required module dependencies (makes the application + * faster) + */ + +var utils = require('lazy-cache')(require); + +/** + * Temporarily re-assign `require` to trick browserify and + * webpack into reconizing lazy dependencies. + * + * This tiny bit of ugliness has the huge dual advantage of + * only loading modules that are actually called at some + * point in the lifecycle of the application, whilst also + * allowing browserify and webpack to find modules that + * are depended on but never actually called. + */ + +var fn = require; +require = utils; + +/** + * Lazily required module dependencies + */ + +require('align-text', 'align'); + +/** + * Restore `require` + */ + +require = fn; + +/** + * Expose `utils` modules + */ + +module.exports = utils; |