1.0.0 • Published 5 years ago
json-sass-theme-variables v1.0.0
Testing ways to share variables between JavaScript and SASS in a maintainable way.
theme.json
is supposed to be used as the single source of truth in this project.
theme.scss
is generated from theme.json
by running the npm script build
.
The npm script release
runs the build script and publishes the package to npm after that.
In scss
files import the theme as follows:
@import '~sass-json-theme-one/theme' // import from theme.scss
In js
files import the theme as follows:
import theme from 'sass-json-theme-one' // import from index.js
/* OR */
import theme from 'sass-json-theme-one/theme' // import from theme.json
1.0.0
5 years ago