@storybook/csf
Advanced tools
Comparing version 0.0.1 to 0.0.2-alpha.0
@@ -0,1 +1,3 @@ | ||
import { StoryProperties } from './properties'; | ||
export * from './properties'; | ||
export declare const sanitize: (string: string) => string; | ||
@@ -18,2 +20,10 @@ export declare const toId: (kind: string, name: string) => string; | ||
}; | ||
export {}; | ||
export interface StoryMetadata { | ||
story?: { | ||
name?: string; | ||
properties?: StoryProperties; | ||
parameters?: { | ||
[key: string]: any; | ||
}; | ||
}; | ||
} |
@@ -6,2 +6,9 @@ "use strict"; | ||
}); | ||
var _exportNames = { | ||
sanitize: true, | ||
toId: true, | ||
storyNameFromExport: true, | ||
isExportStory: true, | ||
parseKind: true | ||
}; | ||
exports.isExportStory = isExportStory; | ||
@@ -12,2 +19,15 @@ exports.parseKind = exports.storyNameFromExport = exports.toId = exports.sanitize = void 0; | ||
var _properties = require("./properties"); | ||
Object.keys(_properties).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function get() { | ||
return _properties[key]; | ||
} | ||
}); | ||
}); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -106,3 +126,7 @@ | ||
}; | ||
/** | ||
* csf story metadata attached to the story export function | ||
*/ | ||
exports.parseKind = parseKind; |
{ | ||
"name": "@storybook/csf", | ||
"version": "0.0.1", | ||
"version": "0.0.2-alpha.0", | ||
"description": "Storybook Component Story Format (CSF) utilities", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -15,2 +15,4 @@ # Storybook Component Story Format (CSF) | ||
- `storyNameFromExport(key)` - Enhance export name (`key`) of the story. Currently implemented with [startCase](https://lodash.com/docs/4.17.11#startCase). | ||
- `isExportStory(key, { includeStories, excludeStories })` - Does a named export match CSF inclusion/exclusion options? | ||
@@ -17,0 +19,0 @@ |
16709
11
374
36