Skip to content

Commit

Permalink
docs(readme): clarify the usage/purpose of the output target
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaskiewicz committed Apr 18, 2024
1 parent 0d3bdcb commit 262fe07
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# Stencil Web-Types Output Target

A Stencil output target for generating [web-types](https://plugins.jetbrains.com/docs/intellij/websymbols-web-types.html#file-structure) to provide intellisense for Stencil components for HTML files.

> [!NOTE]
> This package is experimental - It's pre-v1.0, things may change over time.
## Overview

One of the core features of web components is the ability to create [custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements),
which allow developers to reuse custom functionality defined in their components.
One of the core features of web components is the ability to create [custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements), which allow developers to reuse custom functionality defined in their components.
When Stencil compiles a project, it generates a custom element for each component in the project.
Each of these [custom elements has an associated `tag` name](../components/component.md#component-options) that allows the custom element to be used in HTML files.

By default, integrated development environments (IDEs) like WebStorm are not aware of a project's custom elements when authoring HTML.
By default, integrated development environments (IDEs) like JetBrains' WebStorm are not aware of a project's custom elements when authoring HTML.
In order to enable more intelligent features in JetBrains products such as auto-completion, hover tooltips, etc., developers need to inform it of their project's custom elements.

The `docs-web-types` output target tells Stencil to generate a JSON file containing this information.

This is an opt-in feature and will save a JSON file containing [web-types](https://plugins.jetbrains.com/docs/intellij/websymbols-web-types.html#file-structure) in a directory specified by the output target.
This is an opt-in feature and will save a JSON file containing web-types in a directory specified by the output target.
Once the feature is enabled and your IDE is informed of the JSON file's location, HTML files can gain code editing features similar to TSX files.

## Set Up
Expand Down

0 comments on commit 262fe07

Please sign in to comment.