1.0.3 • Published 5 years ago

@funda/storybook v1.0.3

Weekly downloads
3
License
-
Repository
github
Last release
5 years ago

Funda storybook

Here lives components and their stories used for visualization used at funda

How to use

After cloning the project:

$ npm install

You can either develop new components or just consume existing ones on your project.

For developing or edit existing components

$ npm run dev

This will start storybook and open it on a new browser tab.

For consuming existing components

$ npm install funda-storybook

Install it on your project. And import it as a normal component.

import Button from 'funda-storybook/src/components/Button/Button.vue';

Since Ain't Nobody Got Time for Typing That! ™ the module gives you an alias for webpack.

So you can use available components with:

import Button from '@components/Button/Button.vue';

Installing webpack alias

On your webpack config:

const fundaComponents = require('funda-storybook');

resolve: { alias: { ...fundaComponents } }

Quick reminder on npm link

You don't necessary need to use npm modules from npm. You can symlink local files to behave like they have been installed via npm. In this case is most interesting because you can be developing your components with storybook and want to preview them on your project.

For this module you would do:

$ npm link

Then you would go to the project you are trying to use it and:

$ npm link funda-storybook

This would like this local module as if it was installed.

TODO:

  • Automatic publishing on npm with commit
  • Automatic publishing storybook on commit
  • How to consume CSS
  • Where should static assets live?
1.0.3

5 years ago

1.0.2

5 years ago