micahgodbolt / grunt-phantomcss

Other
24 stars 14 forks source link

Support installations from npm 3.x #13

Closed rlamorea closed 8 years ago

rlamorea commented 8 years ago
rlamorea commented 8 years ago

This should fix https://github.com/micahgodbolt/grunt-phantomcss/issues/6

micahgodbolt commented 8 years ago

Tried this with node .10 and current. Appears to do the trick. Still wondering if there is a more elegant way to do all of this, but working is better than broken!

rlamorea commented 8 years ago

I agree there should be a better approach, but I ended up going with what the PhantomCSS project did with resolveJS. When in Rome....

micahgodbolt commented 8 years ago

Turns out you can use require.resolve() to retrieve the path of any node module you have installed.

Also turns out CasperJS is NOT a node module, it is only installed via NPM, and therefore you can't use require.resolve() on it :-1: