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

feat(output-targets): add section for customElementsExportBehavior #909

Merged

Conversation

tanner-reits
Copy link
Member

This commit modifies the docs for dist-custom-elements to add documentation for the customElementsExportBehavior config option

This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
@vercel
Copy link

vercel bot commented Aug 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
stencil-site ✅ Ready (Inspect) Visit Preview Sep 12, 2022 at 4:38PM (UTC)

This commit updates the docs for `dist-custom-elements` to reflect the renamed values for `CustomElementsExportBehavior`
This commit updates the docs for the `customElementsExportBehavior` config option to reflect the changes to use a type instead of an enum.
src/docs/output-targets/custom-elements.md Outdated Show resolved Hide resolved
src/docs/output-targets/custom-elements.md Outdated Show resolved Hide resolved
| Option | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `default` | No additional re-export or auto-definition behavior will be performed.<br><br>This value will be used if no explicit value is set in the config, or if a given value is not a valid option. |
| `single-export-module` | All component and custom element definition helper functions will be exported from the `index.js` file in the output directory (see [Defining Exported Custom Elements](#defining-exported-custom-elements) for more information on this file's purpose). This file can be used as the root module when distributing your component library, see [below](#distributing-custom-elements) for more details. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a comment about treeshaking here and that it won't always be possible to fully treeshake with this option?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should always be possible once autoDefineCustomElements is migrated to be one of these options and not its own flag. I could add a comment for now with a "todo" to remove it later, but all that should happen before the v3 release anyway 🤷‍♂️

Copy link
Contributor

@alicewriteswrongs alicewriteswrongs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just had one question

defined. This is a known limitation of the API and users should be aware of
it
> defined. This is a known limitation of the API and users should be aware of
> it

### generateTypeDeclarations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have a note here about how this option's behavior is affected by the setting for customElementsExportBehavior ? I think it wouldn't need to be anything more complicated than "When set to generate type declarations, Stencil respects the export behavior selected via customElementsExportBehavior and generates type declarations specific to the content of that file" or something along those lines

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that 👍

This commit adds a not to the `generateTypeDeclarations` section of the `dist-custom-elements` doc notifying users that the types generated will align with the selected `customElementsExportBehavior`
Copy link
Contributor

@alicewriteswrongs alicewriteswrongs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@rwaskiewicz rwaskiewicz merged commit c6be6ef into v3.0.0-dev Sep 12, 2022
@rwaskiewicz rwaskiewicz deleted the feat/v3-custom-elements-export-behavior-section branch September 12, 2022 18:30
rwaskiewicz pushed a commit that referenced this pull request Jan 20, 2023
…909)

This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
rwaskiewicz pushed a commit that referenced this pull request Jan 23, 2023
…909)

This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
rwaskiewicz pushed a commit that referenced this pull request Jan 25, 2023
…909)

This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
rwaskiewicz pushed a commit that referenced this pull request Jan 25, 2023
…909)

This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
rwaskiewicz pushed a commit that referenced this pull request Jan 25, 2023
…909)

This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
rwaskiewicz pushed a commit that referenced this pull request Jan 25, 2023
…909)

This commit modifies the docs for `dist-custom-elements` to add documentation for the `customElementsExportBehavior` config option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants