2.2.5 • Published 3 months ago

@nlo/nuxt-storybook v2.2.5

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Nuxt 3 storybook

Note: This code comes from https://github.com/hirotaka/storybook-addon-nuxt. It was missing a few things we need specifically for NLO (custom plugins/composables), so this was the short way towards being able to start with storybook. If a proper solution comes from the nuxt community or from the source repository, please replace this library with that solution.

Integration for NLO lottery websites. This plugin replaces composables and plugins so that you can use components in storybook.

Installation

Install storybook using:

npx storybook@latest init --type vue3 --builder vite

Install this npm module:

npm install --save-dev @nlo/nuxt-storybook

In your .storybook/main.ts, add the following import:

import { viteFinal } from '@nlo/nuxt-storybook';

And add it to the StorybookConfig like so:

const config: StorybookConfig = {
    ...,
    viteFinal
}

Maintaining

For every plugin or composable that we need in our components that we want to show in Storybook, we need to add a mock in this repository.

Adding a composable mock is easy, add the name of the composable to the stubbedComposables array in index.ts.

You also want to add the actual mock to composables.mjs, like so:

export const useMyComposable = () => ({
	myProperty: 'Hello',
	myFunction: () => {},
});
2.2.5

3 months ago

2.2.4

3 months ago

2.2.3

4 months ago

2.2.2

4 months ago

2.2.1

4 months ago

2.2.0

5 months ago

2.1.1-alpha.0

5 months ago

2.1.1-alpha.1

5 months ago

2.0.2-alpha.11

5 months ago

2.1.0

5 months ago

2.0.1

5 months ago

2.0.1-alpha.26

5 months ago

2.0.0

6 months ago

1.1.2

6 months ago

1.1.1-alpha.18

6 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.1.0-alpha.10

7 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.5-alpha.53

8 months ago

1.0.5-alpha.51

8 months ago

1.0.5-alpha.43

9 months ago

1.0.5-alpha.30

9 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.2-alpha.5

10 months ago

1.0.1

10 months ago

1.0.1-alpha.673

11 months ago