stylelint-themeizer
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

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

  1. Add the plugin to the stylelint config.

.stylelintrc.json

{
	"plugins": [
		"stylelint-themeizer"
	]
}
  1. 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.

License

MIT

Package Sidebar

Install

npm i stylelint-themeizer

Weekly Downloads

2

Version

0.0.5

License

MIT

Unpacked Size

7.97 kB

Total Files

5

Last publish

Collaborators

  • vordgi