Skip to content

Commit

Permalink
fix: publish preset.js file
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Apr 24, 2020
1 parent 115135e commit e44a850
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion misc/storybook-custom-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"files": [
"dist/",
"package.json",
"README.md"
"README.md",
"preset.js"
],
"scripts": {
"build": "yarn cross-env NODE_ENV=production rollup -c",
Expand Down
1 change: 1 addition & 0 deletions misc/storybook-custom-docs/preset copy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./dist/preset');
6 changes: 3 additions & 3 deletions misc/storybook-custom-docs/src/preview-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface DocsOptions {
}

module.exports.default = async function() {
const options: DocsOptions = (getOptions(this) as DocsOptions) || {};
const options: DocsOptions = (getOptions(this) as DocsOptions) || { pages: []};
const { pages } = options;
const callback = this.async();
const code = `
Expand All @@ -18,12 +18,12 @@ ${pages
const channel = addons.getChannel();
const activePages: string[] = [];
const activePages = [];
const attachPage = (pageConfig, viewMode) => {
const ATTACH_DOCS_PAGE = \`attach_docs_page_\${pageConfig.key}\`;
const updatePage = (active: boolean) => {
const updatePage = (active) => {
const id = \`controls-docs-page-\${pageConfig.key}\`;
var node = document.getElementById(id);
if (!node) {
Expand Down

0 comments on commit e44a850

Please sign in to comment.