Closed bbohling closed 7 years ago
Instead hardcoding the paths, it may be advisable to use paths relative to modules folders (e.g. node_modules, bower_components) and instead use a proper import loader.
For ruby sass and raw node sass or sassc, sass-include-paths could be used. For node sass and node sass + eyeglass, also a custom importer could be used.
I’m gonna close this without action, it’s unfortunate the name was already taken in NPM but that’s what I get for using a common term instead of a unique name.
We have a stylesheet/component that uses modularscale-sass that has worked as a bower component for a while now. However, now I want our component to be accessible via npm as well. The issue is that our stylesheet imports modularscale-sass as such:
Which works fine when it is installed via Bower. However, when it is installed via NPM that import statement would have to be modified to:
The path difference is due to the name property being different in modularscale-sass's bower.json and package.json. I'm assuming the NPM name had to be something different since modular-scale was already taken. I would prefer not to create another repo of our solution just for NPM (keeping two repos in sync due to 1-line of code...yuck), but off-hand I don't know how else to handle this situation. Any ideas?