by nadaviv · 13y ago · 0 comments
Why not use the jade that's already installed by the parent app? Due to the way dependencies work in npm, by just removing the jade dependency from jade-inheritance it should just traverse up the directory structure until it finds a jade package. Just instruct users to install jade alongside with jade-inheritance, and instead of using node_modules/jade-inheritance/node_modules/jade, it should use node_modules/jade.
I had tried this approach and had issues in getting it to work. Particularly, how to specify that jade was still a dependency in package.json. Both regular dependency and peer dependency didn't seem to fit the bill.
A simple proof-of-concept would be to take the built-in binary and have that be it's own package which depends on jade and jade-inheritance.
If you can offer some advice on how to go about this, could you create an issue? https://github.com/paulyoung/jade-inheritance/issues
Thanks!