Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build lib/addons with ts-up #18805

Merged
merged 8 commits into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/addons/a11y/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference types="webpack-env" />

import type { AnyFramework, DecoratorFunction } from '@storybook/csf';
import deprecate from 'util-deprecate';
import { dedent } from 'ts-dedent';
Expand Down
2 changes: 2 additions & 0 deletions code/addons/actions/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference types="webpack-env" />

export * from './constants';
export * from './models';
export * from './preview';
Expand Down
2 changes: 2 additions & 0 deletions code/addons/backgrounds/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference types="webpack-env" />

if (module && module.hot && module.hot.decline) {
module.hot.decline();
}
Expand Down
2 changes: 2 additions & 0 deletions code/addons/jest/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference types="webpack-env" />

import { addons } from '@storybook/addons';
import { normalize, sep } from 'upath';
import { ADD_TESTS, defineJestParameter } from './shared';
Expand Down
2 changes: 2 additions & 0 deletions code/addons/links/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference types="webpack-env" />

import { dedent } from 'ts-dedent';

let hasWarned = false;
Expand Down
2 changes: 2 additions & 0 deletions code/addons/measure/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference types="webpack-env" />

if (module && module.hot && module.hot.decline) {
module.hot.decline();
}
Expand Down
2 changes: 2 additions & 0 deletions code/addons/outline/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference types="webpack-env" />

if (module && module.hot && module.hot.decline) {
module.hot.decline();
}
Expand Down
2 changes: 2 additions & 0 deletions code/addons/storysource/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference types="webpack-env" />

import { ADDON_ID, PANEL_ID } from './events';

export { ADDON_ID, PANEL_ID };
Expand Down
21 changes: 17 additions & 4 deletions code/lib/addons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,17 @@
},
"license": "MIT",
"sideEffects": false,
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist/**/*",
"README.md",
Expand All @@ -31,7 +39,7 @@
],
"scripts": {
"check": "../../../scripts/node_modules/.bin/tsc --noEmit",
"prep": "node ../../../scripts/prepare.js"
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/api": "7.0.0-alpha.34",
Expand All @@ -50,5 +58,10 @@
"publishConfig": {
"access": "public"
},
"bundler": {
"entries": [
"./src/index.ts"
]
},
"gitHead": "fc90fc875462421c1faa35862ac4bc436de8e75f"
}
8 changes: 4 additions & 4 deletions code/lib/ui/src/globals/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ export default {
'@storybook/addons': [
'AddonStore',
'Channel',
'HooksContext',
'addons',
'makeDecorator',
'applyHooks',
'isSupportedType',
'types',
'makeDecorator',
'mockChannel',
'HooksContext',
'applyHooks',
'types',
'useArgs',
'useCallback',
'useChannel',
Expand Down