-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Ember: Fix @storybook/ember #23435
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
Merged
Merged
Ember: Fix @storybook/ember #23435
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
3fcbe02
Add ember template
francois2metz fbd6c2f
Add framework name parameter when calling the baseGenerator
francois2metz b25d83d
Remove findDistEsm
nlepage 2b868c0
Use webpack5 by default with ember
francois2metz 20064d5
Disable framework-preset-ember-docs for now
francois2metz 9472245
Try to restore the previous integration
francois2metz be94cfd
Switch to ember-cli 3.28
francois2metz eec3ee4
Fix global use
francois2metz f81ab94
Extract a loadEmberApp function
francois2metz 581590e
Update peer dependencies
francois2metz 21a961e
Add empty components and stories template directories
francois2metz ad47e3c
Fix docs addon
francois2metz c81bacc
Fix link
francois2metz 7ad4c8e
Use global env.
francois2metz ebe052d
Test with ember 4.12.
francois2metz a5a1a08
Update hbs templates to work with newer releases of ember
francois2metz 5c8acb2
Split ember 3 and ember 4 templates
francois2metz 735affa
Add empty components file to avoid the build to fail
francois2metz 1fa0aca
Proxy @storybook/ember-cli-storybook on verdaccio
francois2metz 4090ac4
Fix the ember sandbox template to work without any manual updates
francois2metz 18f71dd
Add ember/default-js to normal tests
francois2metz 4f416d8
Additional fixes to ember for sb7
gossi c3d59e5
Update name
francois2metz aac2526
Fix template formatting
shilman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.