From e111f59607d970079fb00f617dae2e96cd9b6ba8 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 14 Feb 2017 12:27:12 +1100 Subject: [PATCH] Static imports to aid bundle traversing tools Browserify requires static imports in order to establish a dependency tree. --- index.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index 737d1332..b3690706 100644 --- a/index.js +++ b/index.js @@ -207,18 +207,16 @@ 'use strict'; - // deps :: Array String - var deps = [ - 'sanctuary-def', - 'sanctuary-type-classes', - 'sanctuary-type-identifiers' - ]; - /* istanbul ignore else */ if (typeof module === 'object' && typeof module.exports === 'object') { - module.exports = f(require(deps[0]), require(deps[1]), require(deps[2])); + module.exports = f(require('sanctuary-def'), + require('sanctuary-type-classes'), + require('sanctuary-type-identifiers')); } else if (typeof define === 'function' && define.amd != null) { - define(deps, f); + define(['sanctuary-def', + 'sanctuary-type-classes', + 'sanctuary-type-identifiers'], + f); } else { self.sanctuary = f(self.sanctuaryDef, self.sanctuaryTypeClasses,