strarsis / sass-include-paths

Generates include paths for node-sass for packages from popular package managers like npm, bower, ruby gem, ruby bundler.
MIT License
12 stars 3 forks source link

Support other renderers like Stylus... #6

Open dkebler opened 8 years ago

dkebler commented 8 years ago

Just took a two second look at your source and wondering if your code could be "easily" altered to be more generic by supporting generating an array of paths for any "main" file type? Pass in your file type and it returns array for same. Maybe as easy as generating your glob strings instead of hard coding them?

The stylus renderer works pretty much the same, taking an array of paths http://stylus-lang.com/docs/js.html

var sassFoldersGlobStr    = '{stylesheets,sass}';
var sassLibFoldersGlobStr = '{stylesheets,sass,lib,dist,assets/{sass,stylesheets},scss}';
var sassFilesGlobStr      = '*.{sass,scss}';
var sassGemsGlobStr = path.join('gems/*', sassFoldersGlobStr);

If this doesn't involve a major rewrite I could maybe do it as a fork with your input on the best way.

strarsis commented 8 years ago

Yes, this is a good idea. It would go into a new module then (and either replace this one or with a new version of this on top of it).