Skip to content

SnejUgal/attheme-rules

Repository files navigation

attheme-rules

A module for testing .attheme's for potentional issues.

Installing

npm i attheme-rules

Using

import Attheme from "attheme-js";
import { testTheme } from "attheme-rules";

const theme = new Attheme(`divider=#ff00ff`);
const testResults = testTheme(theme);

console.log(...testResults);

The output is:

{ type: 'warning',
  name: 'purple-variables',
  variables: [ 'divider' ] }

Documentation

atthemeRules.testTheme(theme: Attheme): RuleResult[]

type Type = "warning" | "error";

interface RuleResult {
  type: Type;
  name: string;
  variables: string[];
}

Accepts a theme and runs the rules, returns an array of failed rules' results.

About

Test .attheme files for potentional issues.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published