Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stencil-community/web-types-output-target

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stencil-community/web-types-output-target - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

12

package.json
{
"name": "@stencil-community/web-types-output-target",
"version": "0.4.0",
"version": "0.4.1",
"description": "an experimental stencil output target supporting web-types",

@@ -31,13 +31,13 @@ "main": "dist/index.js",

"@types/node": "^20.12.8",
"@vitest/coverage-v8": "^1.5.0",
"prettier": "3.3.2",
"@vitest/coverage-v8": "^2.0.0",
"prettier": "3.3.3",
"release-it": "^17.2.0",
"typescript": "^5.4.3",
"vitest": "^1.4.0"
"vitest": "^2.0.0"
},
"prettier": "@ionic/prettier-config",
"volta": {
"node": "20.15.0",
"npm": "10.8.1"
"node": "20.15.1",
"npm": "10.8.2"
}
}

@@ -20,3 +20,3 @@ # 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 in HTML files.
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 in HTML and Vue files.

@@ -29,7 +29,7 @@ > [!NOTE]

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 by 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).
When Stencil compiles a project, it generates a custom element for each component in the project.
By default, integrated development environments (IDEs) like JetBrains' WebStorm are not aware of a project's custom elements.
This causes the IDE to often warn developers that it doesn't have any information about their custom elements, and results in a poorer developement experience.
This causes the IDE to often warn developers that it doesn't have any information about their custom elements, and results in a poorer development experience.
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.

@@ -40,7 +40,7 @@

This is an opt-in feature and will write 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, writing code in HTML files will have similar intellisense to that of TSX files.
Once the feature is enabled and your IDE is informed of the JSON file's location, writing code in HTML and Vue files will have similar intellisense to that of TSX files.
## Set Up
The output target is not built in to Stencil itself.
The output target is not built into Stencil itself.
It's a third party package, that needs to be installed as a dev-dependency:

@@ -74,11 +74,22 @@ ```bash

Since v0.3.0.
Since [v0.3.0](https://github.com/stencil-community/stencil-web-types/releases/tag/v0.3.0).
Description: A string that represents the directory to place the output file.
Users may specify either a directory (e.g. '../'), a filename (e.g. 'my-types.json') or both (e.g. '../my-types.json').
If no filename ending is '.json' is provided, the output target assumes that a filename must be added to the path.
In such cases, the default 'web-types.json' will be added to the path.
Description: A string that represents location of the file generated by this output target.
Users may specify any of the following:
- A relative directory (e.g. `'../'`)
- A filename (e.g. `'my-types.json'`)
- A relative directory ending in a filename (e.g. `'../my-types.json'`).
It is not recommended that users use absolute paths for this setting, as this can cause errors in projects shared by more than one developer.
It is not recommended to use absolute paths for this setting, as this can cause errors in projects shared by more than one developer/environment.
An error will be logged to the console if an absolute path is detected.
Any relative file path provided will be relative to the 'root directory' of your Stencil project.
By default, this is the directory your project's `stencil.config.ts` is in.
If the value provided does not end in `'.json'`, the output target assumes that a filename must be added to the path.
In such cases, the default name, `'web-types.json'`, will be added to the path:
- `../` will be transformed to `../web-types.json`
- `./web-types` will be transformed to `./web-types/web-types.json`
- `./my-types.json` will not be transformed, as the provided value ends in `'.json'`
## Using Web Types

@@ -85,0 +96,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc