aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-10-06 17:48:10 +0200
committerIgor Pashev <pashev.igor@gmail.com>2019-10-06 17:48:10 +0200
commit33f717e2de267fafd22b9af3745240cf7051043f (patch)
tree489977037e406e24ec13d98b695714485d17732d /lib
parent443c70d90a5cd0e958a653ed8df3352c9aac06d9 (diff)
downloadnpm4nix-33f717e2de267fafd22b9af3745240cf7051043f.tar.gz
Refactor by moving template render on top
Diffstat (limited to 'lib')
-rw-r--r--lib/template.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/template.js b/lib/template.js
index ce05473..c1446a9 100644
--- a/lib/template.js
+++ b/lib/template.js
@@ -29,7 +29,10 @@ function fmt(words, maxLine, glue1, glue2) {
}
-function render(src, pkg) {
+function render({
+ src,
+ pkg
+}) {
const deps = pkg.dependencies || {};
const devDeps = pkg.devDependencies || {};
const npmInputs = Object.keys({...deps,
@@ -86,4 +89,4 @@ ${source}
`;
}
-module.exports = render;
+module.exports = render; \ No newline at end of file