diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-10-15 09:23:31 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-10-15 09:23:31 +0800 |
| commit | be4d8a9462de720e6b22cf291860cf4a87e066ae (patch) | |
| tree | 423bb8ad04d05f3ca47d67141bad6d536f2aef43 /node_modules/center-align/utils.js | |
| parent | b5134a5a8d953fd741a17536959293ba855ffd66 (diff) | |
updates
Diffstat (limited to 'node_modules/center-align/utils.js')
| -rw-r--r-- | node_modules/center-align/utils.js | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/node_modules/center-align/utils.js b/node_modules/center-align/utils.js new file mode 100644 index 00000000..aead6d2f --- /dev/null +++ b/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; |
