Skip to content

Commit

Permalink
chore(readme): update outFile documentation (#76)
Browse files Browse the repository at this point in the history
* chore(readme): update outFile documentation

* Update README.md
  • Loading branch information
rwaskiewicz authored Jul 18, 2024
1 parent e340ce5 commit baca5ab
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,25 @@ The following are properties on that configuration object.

Defaults to `StencilConfig#{rootDir}/web-types.json`.

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

Expand Down

0 comments on commit baca5ab

Please sign in to comment.