JSPM

stylelint-themeizer

0.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q30851F
  • License MIT

Stylelint plugin for "Themeizer" ecosystem

Package Exports

  • stylelint-themeizer
  • stylelint-themeizer/dist/variables.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stylelint-themeizer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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

  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