Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

pkg helper is broken #25

Closed
fesor opened this issue Nov 26, 2016 · 0 comments · Fixed by #27
Closed

pkg helper is broken #25

fesor opened this issue Nov 26, 2016 · 0 comments · Fixed by #27

Comments

@fesor
Copy link

fesor commented Nov 26, 2016

Currently pkg helper is broken since plup uses wrong path to load package.json:

https://github.com/amwmedia/node-plop/blob/master/src/modules/node-plop.js#L112

Basicly node-plop uses path before setPlopfilePath is called, so instead of /foo/bar/package.json it uses /foo/bar/plopfile.js/package.json.

Solution:

+ try { pkgJson = require(path.join(path.dirname(getDestBasePath()), 'package.json')); }

But this is kinda "hack", the problem itself is that plopfilePath contains both file path and directory path depending on time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant