davidguttman / cssify

Simple middleware for Browserify to add css styles to the browser.
122 stars 19 forks source link

Use __dirname instead of 'cssify' to find the cssify package in the wrapper #3

Closed 00dani closed 10 years ago

00dani commented 10 years ago

Previously, cssify had to be installed at the "top-level" so that the require() added to each CSS file could find it. With this change, cssify can be installed as a dependency of some other module and still work correctly.

(My use-case is adding cssify as another transform to my Browserify-wrapping module, compilist: http://gigahard.mine.nu/hg/compilist/ )

davidguttman commented 10 years ago

Thanks, merged! It’s in 0.4.0

On Sunday, January 5, 2014 at 11:47 PM, 00Davo wrote:

Previously, cssify had to be installed at the "top-level" so that the require() added to each CSS file could find it. With this change, cssify can be installed as a dependency of some other module and still work correctly. (My use-case is adding cssify as another transform to my Browserify-wrapping module, compilist: http://gigahard.mine.nu/hg/compilist/ ) You can merge this Pull Request by running git pull https://github.com/00Davo/cssify relative-package-path Or view, comment on, or merge it at: https://github.com/davidguttman/cssify/pull/3 Commit Summary Use __dirname instead of 'cssify' to find the cssify package in the wrapper

File Changes M index.js (https://github.com/davidguttman/cssify/pull/3/files#diff-0) (4)

Patch Links: https://github.com/davidguttman/cssify/pull/3.patch https://github.com/davidguttman/cssify/pull/3.diff

— Reply to this email directly or view it on GitHub (https://github.com/davidguttman/cssify/pull/3).