Skip to content

Commit

Permalink
Move to webpack for storybook support
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnelson committed Jul 14, 2018
1 parent a7edcef commit 25d4c21
Show file tree
Hide file tree
Showing 19 changed files with 5,440 additions and 1,232 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8
1 change: 1 addition & 0 deletions .storybook/addons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "@storybook/addon-actions/register";
9 changes: 9 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { configure } from "@storybook/react";

// automatically import all files ending in *.stories.js
const req = require.context("../src", true, /.stories.tsx$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
}

configure(loadStories, module);
9 changes: 9 additions & 0 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const path = require("path");
module.exports = (baseConfig, env, defaultConfig) => {
defaultConfig.module.rules.push({
test: /\.(ts|tsx)$/,
loader: require.resolve("awesome-typescript-loader")
});
defaultConfig.resolve.extensions.push(".ts", ".tsx");
return defaultConfig;
};
11 changes: 0 additions & 11 deletions demo/demo.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions demo/index.html

This file was deleted.

6 changes: 0 additions & 6 deletions demo/index.tsx

This file was deleted.

Loading

0 comments on commit 25d4c21

Please sign in to comment.