From 2293de07a7b6c0de969606e42a5c98b6e4efb196 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 3 Apr 2016 23:47:07 -0700 Subject: [PATCH] Add `_falseOptions` module. --- lib/fp/build-modules.js | 3 ++- lib/fp/template/modules/_falseOptions.jst | 7 +++++++ lib/fp/template/modules/thru.jst | 11 ++--------- 3 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 lib/fp/template/modules/_falseOptions.jst diff --git a/lib/fp/build-modules.js b/lib/fp/build-modules.js index 39894dd9a..5479c9a1c 100644 --- a/lib/fp/build-modules.js +++ b/lib/fp/build-modules.js @@ -109,9 +109,10 @@ function build(target) { }); actions.unshift(util.copyFile(path.join(__dirname, '../../fp'), fpPath)); + actions.push(util.writeFile(path.join(fpPath, '_falseOptions.js'), template._falseOptions())); + actions.push(util.writeFile(path.join(fpPath, '_util.js'), template._util())); actions.push(util.writeFile(path.join(target, 'fp.js'), template.fp())); actions.push(util.writeFile(path.join(fpPath, 'convert.js'), template.convert())); - actions.push(util.writeFile(path.join(fpPath, '_util.js'), template._util())); async.series(actions, onComplete); } diff --git a/lib/fp/template/modules/_falseOptions.jst b/lib/fp/template/modules/_falseOptions.jst new file mode 100644 index 000000000..8789f50ab --- /dev/null +++ b/lib/fp/template/modules/_falseOptions.jst @@ -0,0 +1,7 @@ +module.exports = { + 'cap': false, + 'curry': false, + 'fixed': false, + 'immutable': false, + 'rearg': false +}); diff --git a/lib/fp/template/modules/thru.jst b/lib/fp/template/modules/thru.jst index 2fd000f83..5bc1a7b03 100644 --- a/lib/fp/template/modules/thru.jst +++ b/lib/fp/template/modules/thru.jst @@ -1,12 +1,5 @@ -var convert = require('./convert'); - -var func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'), { - 'cap': false, - 'curry': false, - 'fixed': false, - 'immutable': false, - 'rearg': false -}); +var convert = require('./convert'), + func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;