davidar / pandiff

Prose diffs for any document format supported by Pandoc
MIT License
285 stars 24 forks source link

Support flat npm module layout #2

Closed ptgolden closed 5 years ago

ptgolden commented 5 years ago

I get this message when running pandiff with the -s option:

/home/ptgolden/npm-local/node_modules/pandiff/node_modules/github-markdown-css/github-markdown.css: openBinaryFile: does not exist (No such file or directory)

Since npm3, it is no longer necessarily the case that the dependencies of an installed npm module will be located in the node_modules directory of that module. This commit uses require.resolve to find the location of the github-markdown-css file, rather than assuming its location in a nested node_modules folder.

davidar commented 5 years ago

Thanks!