lion/.storybook/main.js
Thomas Allmer ea2ba7f1f6 chore: announcement blog
Co-authored-by: Passle <pascalschilp@gmail.com>
2020-02-12 18:22:57 +01:00

48 lines
1.6 KiB
JavaScript

const fs = require('fs');
const path = require('path');
module.exports = {
stories: [
'../packages/*/stories/*.stories.{js,mdx}',
'../packages/helpers/*/stories/*.stories.{js,mdx}',
'../demo/stories/*.stories.{js,mdx}',
],
esDevServer: {
nodeResolve: true,
watch: true,
open: true,
},
rollup: configs => {
// temporarily hard copy all needed global files as all tested rollup plugins flatten the
// directory structure
// `rollup-plugin-copy` might work if issue 37 is resolved
// https://github.com/vladshcherbin/rollup-plugin-copy/issues/37
for (const config of configs) {
config.plugins.push({
generateBundle() {
this.emitFile({
type: 'asset',
fileName: 'packages/form-system/dev-assets/FormatMixinDiagram-1.svg',
source: fs.readFileSync(
path.join(__dirname, '../packages/form-system/dev-assets/FormatMixinDiagram-1.svg'),
),
});
this.emitFile({
type: 'asset',
fileName: 'packages/form-system/dev-assets/FormatMixinDiagram-2.svg',
source: fs.readFileSync(
path.join(__dirname, '../packages/form-system/dev-assets/FormatMixinDiagram-2.svg'),
),
});
this.emitFile({
type: 'asset',
fileName: 'packages/form-system/dev-assets/FormatMixinDiagram-3.svg',
source: fs.readFileSync(
path.join(__dirname, '../packages/form-system/dev-assets/FormatMixinDiagram-3.svg'),
),
});
},
});
}
},
};