I'm currently trying to figure out how to package a couple of .scss files that we are using in a few apps into an NPM package.
I've done that previously for JS and TS libs, however I'm getting slightly confused on having packages with non-code payloads, especially because packages require an index.js entry point.
Some examples:
- Package of styles (css/scss)
- Package of fonts
- Package of other non-code content
Are these valid uses of npm packages or am I thinking about it all wrong? The main reason on why I'd want it to be a package, is to have it versioned and easily installed through 'npm install package-name'.
Edit: I actually got it working okay by removing '"main": "index.js",' part of the package.json, npm installing that package of github and simply importing the scss file into my consuming application. Is this approach incorrect? What are the issues that this will cause?
Thanks!