'Sharing sass files between an npm package and a ruby gem
I have two libraries where I am creating view components. One library is written in sass for styles and typescript for markup. The other is using ruby for the markup (view helpers) and also using sass for the stylsheets.
I want to share the sass between both frameworks. The gem is a rails engine so it has this directory structure:
-app
--assets
---stylesheets
----engine_name
-----button.scss
the npm package is something like
-src
--components
---button.scss
How could these two codebases cleanly share button.scss
I don't mind having both the gem and npm package in the same repo and accessing a common directory but how do you import sass files in a rails engine if the files are not actually at app/assets/**
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|