-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
363 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
const { resolve } = require('path'); | ||
const rollup = require('rollup'); | ||
|
||
const rollupTypescript = require('@rollup/plugin-typescript'); | ||
const { nodeResolve } = require('@rollup/plugin-node-resolve'); | ||
const commonjs = require('@rollup/plugin-commonjs'); | ||
const json = require('@rollup/plugin-json'); | ||
const { babel } = require('@rollup/plugin-babel'); | ||
|
||
const previewInputOptions = { | ||
input: resolve(__dirname, '../src/index.ts'), // conditionally required | ||
plugins: [ | ||
nodeResolve(), | ||
commonjs(), | ||
json(), | ||
babel({ babelHelpers: 'bundled' }), | ||
rollupTypescript(), | ||
], | ||
external: ['@storybook/addons', '@storybook/theming', 'react', 'react-dom', '@storybook/csf'], | ||
}; | ||
|
||
const previewOutputOptions = { | ||
dir: resolve(__dirname, '../bundle'), | ||
format: 'es', // required | ||
}; | ||
|
||
// see below for details on the options | ||
|
||
async function build() { | ||
// create a bundle | ||
const bundle = await rollup.rollup(previewInputOptions); | ||
|
||
await bundle.generate(previewOutputOptions); | ||
|
||
// or write the bundle to disk | ||
await bundle.write(previewOutputOptions); | ||
|
||
// closes the bundle | ||
await bundle.close(); | ||
} | ||
|
||
build(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import React from 'react'; | ||
import { Loader } from '../Loader/Loader'; | ||
|
||
export const StorySkeleton = () => <Loader />; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.