-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23435 from 1024pix/fix-ember-3.28
Ember: Fix @storybook/ember
- Loading branch information
Showing
25 changed files
with
87 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import './globals'; | ||
|
||
export { renderToCanvas } from './render'; | ||
|
||
export const parameters = { renderer: 'ember' as const }; |
This file was deleted.
Oops, something went wrong.
6 changes: 4 additions & 2 deletions
6
...rameworks/ember/src/client/docs/config.js → ...s/ember/src/client/preview/docs/config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
import type { ArgTypesEnhancer } from '@storybook/types'; | ||
import { enhanceArgTypes } from '@storybook/docs-tools'; | ||
|
||
import { extractArgTypes, extractComponentDescription } from './jsondoc'; | ||
|
||
export const parameters = { | ||
export const parameters: {} = { | ||
docs: { | ||
story: { iframeHeight: '80px' }, | ||
extractArgTypes, | ||
extractComponentDescription, | ||
}, | ||
}; | ||
|
||
export const argTypesEnhancers = [enhanceArgTypes]; | ||
export const argTypesEnhancers: ArgTypesEnhancer[] = [enhanceArgTypes]; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/// <reference types="webpack-env" /> | ||
|
||
import './client/preview'; | ||
export * from './types'; | ||
|
||
// optimization: stop HMR propagation in webpack | ||
if (typeof module !== 'undefined') module?.hot?.decline(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
code/frameworks/ember/src/server/framework-preset-ember-docs.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import type { PresetProperty } from '@storybook/types'; | ||
import { findDistEsm } from '@storybook/core-common'; | ||
import { hasDocsOrControls } from '@storybook/docs-tools'; | ||
import { findDistFile } from '../util'; | ||
|
||
export const previewAnnotations: PresetProperty<'previewAnnotations'> = (entry = [], options) => { | ||
if (!hasDocsOrControls(options)) return entry; | ||
return [...entry, findDistEsm(__dirname, 'client/docs/config')]; | ||
return [...entry, findDistFile(__dirname, 'client/preview/docs/config')]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../lib/core-common/src/utils/findDistEsm.ts → code/frameworks/ember/src/util.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import path from 'path'; | ||
import { sync as findUpSync } from 'find-up'; | ||
|
||
export const findDistEsm = (cwd: string, relativePath: string) => { | ||
export const findDistFile = (cwd: string, relativePath: string) => { | ||
const nearestPackageJson = findUpSync('package.json', { cwd }); | ||
if (!nearestPackageJson) { | ||
throw new Error(`Could not find package.json in: ${cwd}`); | ||
} | ||
const packageDir = path.dirname(nearestPackageJson); | ||
|
||
return path.join(packageDir, 'dist', 'esm', relativePath); | ||
return path.join(packageDir, 'dist', relativePath); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.