UNPKG

storybook-addon-source-link

Version:

Add a button to the Storybook toolbar that opens the file containing the Story in an IDE like VSCode.

17 lines (15 loc) 304 B
// src/preset.ts var env = (base, _config) => { if (_config.configType !== "DEVELOPMENT") { return { ...base, SOURCE_LINK_PROJECT_ROOT_PATH: "" }; } const workingDir = process.cwd(); return { ...base, SOURCE_LINK_PROJECT_ROOT_PATH: workingDir }; }; export { env };