0.0.19 • Published 2 years ago

@acot/acot-runner-storybook v0.0.19

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

@acot/acot-runner-storybook

An acot custom runner for Storybook.

The @acot/acot-runner-storybook crawls all the Stories in Storybook and sets them up for acot to audit.

Installation

Install via npm:

$ npm install --save-dev @acot/acot-runner-storybook

Usage

Add @acot/storybook to the runner field of the configuration file.

{
  "runner": "@acot/storybook"
}

Custom config for each story

You can pass a custom config to the parameters.acot field in Story's metadata, as in the following example:

// Component Story Format (CSF) Example:
export default {
  title: 'Button',
  component: Button,
  parameters: {
    acot: {
      rules: {
        '@acot/wcag/button-has-name': 'off',
      },
    },
  },
};

Options

include

Type: string[]
Required: false

The Story name pattern to include in the audit target. See the micromatch documentation for pattern strings.

{
  "runner": {
    "uses": "@acot/storybook",
    "with": {
      "include": ["*", "/atoms/**/*"]
    }
  }
}

exclude

Type: string[]
Required: false

The Story name pattern to exclude in the audit target. See the micromatch documentation for pattern strings.

{
  "runner": {
    "uses": "@acot/storybook",
    "with": {
      "exclude": ["/utils/**/*"]
    }
  }
}

timeout

Type: number
Default: 60000
Required: false

Maximum time in milliseconds to wait for the browser instance to collect stories.

{
  "runner": {
    "uses": "@acot/storybook",
    "with": {
      "timeout": 120000
    }
  }
}

Storybook compatibility

Storybook versions

  • Storybook v5
  • Storybook v6

UI frameworks

Since @acot/acot-runner-storybook doesn't rely on UI frameworks like React, Angular, or Vue.js, it can be used in conjunction with any UI framework of your choice!

0.0.19

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.17-canary.0

2 years ago

0.0.17-canary.2

2 years ago

0.0.17-canary.1

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.14-canary.0

2 years ago

0.0.14-canary.2

2 years ago

0.0.13

3 years ago

0.0.13-canary.0

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.10-canary.0

3 years ago

0.0.9-canary.0

3 years ago

0.0.8

3 years ago

0.0.7-canary.0

3 years ago

0.0.7

3 years ago

0.0.6-canary.0

3 years ago

0.0.4

3 years ago

0.0.4-canary.1

3 years ago

0.0.4-canary.0

3 years ago

0.0.3

3 years ago

0.0.3-canary.2

3 years ago

0.0.3-canary.1

3 years ago

0.0.3-canary.0

3 years ago

0.0.2

3 years ago

0.0.2-canary.7

3 years ago

0.0.2-canary.4

4 years ago

0.0.2-canary.3

4 years ago

0.0.2-canary.6

4 years ago

0.0.2-canary.5

4 years ago

0.0.2-canary.2

4 years ago

0.0.2-canary.0

4 years ago

0.0.2-canary.1

4 years ago

0.0.1

4 years ago