Soruce-loader: Export extract-source in its own entry point

This commit is contained in:
Michael Shilman 2020-09-09 16:52:18 +08:00
parent cf7c1c33df
commit 0c8b9ac0d9
5 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import { combineParameters } from '@storybook/client-api';
import { StoryContext, Parameters } from '@storybook/addons';
import { extractSource, LocationsMap } from '@storybook/source-loader';
import { extractSource, LocationsMap } from '@storybook/source-loader/extract-source';
interface StorySource {
source: string;

1
lib/source-loader/extract-source.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export * from './dist/extract-source.d';

View File

@ -0,0 +1 @@
module.exports = require('./dist/extract-source');

View File

@ -1,5 +1,7 @@
import type { SourceBlock } from './types';
export * from './types';
/**
* given a location, extract the text from the full source
*/

View File

@ -2,7 +2,3 @@
import { transform } from './build';
export default transform;
export * from './types';
export { extractSource } from './extract-source';