diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2019-10-06 17:48:10 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2019-10-06 17:48:10 +0200 |
commit | 33f717e2de267fafd22b9af3745240cf7051043f (patch) | |
tree | 489977037e406e24ec13d98b695714485d17732d /lib | |
parent | 443c70d90a5cd0e958a653ed8df3352c9aac06d9 (diff) | |
download | npm4nix-33f717e2de267fafd22b9af3745240cf7051043f.tar.gz |
Refactor by moving template render on top
Diffstat (limited to 'lib')
-rw-r--r-- | lib/template.js | 7 |
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 |