From fee3f13eb1055d26cf6545a59c8ac6c16e900a6e Mon Sep 17 00:00:00 2001 From: Tanner Reits <47483144+tanner-reits@users.noreply.github.com> Date: Mon, 1 Aug 2022 15:31:35 -0400 Subject: [PATCH] docs(config): update default values for sourcemaps and type gen (#899) this commit updates the documentation to coincide with the changes made in https://github.com/ionic-team/stencil/commit/72419685e993935380349be27e4ed1fd9fac9d8b (https://github.com/ionic-team/stencil/pull/3502). specifically, it updates the documentation to denote: - source maps will be generated by default - types for the `dist-custom-elements` output target will be generated by default --- versioned_docs/version-v2/config/overview.md | 9 ++++----- .../version-v2/output-targets/custom-elements.md | 16 +++++----------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/versioned_docs/version-v2/config/overview.md b/versioned_docs/version-v2/config/overview.md index ab996c257..a90140142 100644 --- a/versioned_docs/version-v2/config/overview.md +++ b/versioned_docs/version-v2/config/overview.md @@ -192,12 +192,13 @@ Will generate the following comment: ## sourceMap -*default: `false`* +*default: `true`* -When set to `true`, sourcemaps will be generated for a project. +When omitted or set to `true`, sourcemaps will be generated for a project. +When set to `false`, sourcemaps will not be generated. ```tsx -sourceMap: true +sourceMap: true | false ``` Sourcemaps create a translation between Stencil components that are written in TypeScript/JSX and the resulting @@ -213,8 +214,6 @@ compared to the minified result produced when `sourceMap` is not enabled. Developers are responsible for determining whether or not they choose to serve sourcemaps in each environment their components are served and implementing their decision accordingly. -When omitted or set to `false`, sourcemaps will not be generated. - ## srcDir *default: `src`* diff --git a/versioned_docs/version-v2/output-targets/custom-elements.md b/versioned_docs/version-v2/output-targets/custom-elements.md index cb485828d..4aabf1588 100644 --- a/versioned_docs/version-v2/output-targets/custom-elements.md +++ b/versioned_docs/version-v2/output-targets/custom-elements.md @@ -67,8 +67,8 @@ will also automatically recursively define any child components as well. This flag defaults to `false` when omitted from a Stencil configuration file. :::note -At this time, components created not using JSX may not be automatically -defined. This is a known limitation of the API and users should be aware of +At this time, components that do not use JSX cannot be automatically +defined. This is a known limitation of Stencil that users should be aware of. it ::: @@ -84,17 +84,11 @@ This flag defaults to `true` when omitted from a Stencil configuration file. ### generateTypeDeclarations -By default, type declaration files (`.d.ts` files) are only generated for the `dist-custom-elements` output target when -the [`dist` output target](/distribution) is also declared in a Stencil project's configuration. This behavior -isn't always desirable, as not all users need the files emitted by the `dist` output target. To generate type -declaration files for the `dist-custom-elements`, the experimental `generateTypeDeclarations` field can be set to -`true`. +By default, Stencil will generate type declaration files (`.d.ts` files) as a part of the `dist-custom-elements` output target through the `generateTypeDeclarations` field on the target options. Type declaration files will be placed in the `dist/types` directory in the root of a Stencil project. At this time, this output destination is not able to be configured. -Setting this flag to `true` will generate type declaration files for the `dist-custom-elements` output target. Type -declaration files will be placed in the `dist/types` directory in the root of a Stencil project. At this time, this -output destination is not able to be configured. +Setting this flag to `false` will not generate type declaration files for the `dist-custom-elements` output target. -This flag defaults to `false` when omitted from a Stencil configuration file. +This flag defaults to `true` when omitted from a Stencil configuration file. ## Making Assets Available