stylelint-themeizer
v0.0.5
Published
Stylelint plugin for "Themeizer" ecosystem
Downloads
6
Maintainers
Readme
Stylelint themeizer
Stylelint plugin for "Themeizer" ecosystem.
Features
Checking for the existence of all colors (as well as linear and radial gradients) as a css variable.
Replace them automatically when using stylelint with the --fix
option.
Installation
$ npm install --save-dev stylelint-themeizer
or
$ yarn add --dev stylelint-themeizer
Usage
- Add the plugin to the stylelint config.
.stylelintrc.json
{
"plugins": [
"stylelint-themeizer"
]
}
- Configure the rule
{
"plugins": [
"stylelint-themeizer"
],
"rules": {
"themeizer/variables": {
"url": "https://example.com/api/themes/",
"revalidate": 0.5,
"lookedTheme": "default-theme-name",
"headers": {
"key": "value"
},
"autoFix": true
}
}
}
where:
url
– api url to load and read colors
revalidate
– period in which to fetch styles (in minutes)
lookedTheme
– the name of the main theme in which to look colors
headers
– an object of headers required for reading from api
autoFix
– enable autofixes when running with --fix. Defaults to true
Themeizer ecosystem
- Figma plugin "Themeizer" – plugin for changing themes in design and publishing them in the cloud;
- themeizer – package for embedding themes from "Themeizer" Figma plugin at the server level or at build stage;
- next-themeizer – package for adding "Themeizer" ecosystem interaction configuration to your next.js application;
- themeizer-cli – package to automatically replace published colors (as well as linear and radial gradients) in style files with a css variable;
- stylelint-themeizer – stylelint plugin for "Themeizer" ecosystem.