attheme-rules

0.2.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i attheme-rules

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

9.04 kB

Total Files

5

Last publish

Collaborators

  • snejugal