Skip to content

Commit

Permalink
[docs] Fix compat-table link in publishing (#1276)
Browse files Browse the repository at this point in the history
* Fix compat-table link

* Remove bad link from known good urls
  • Loading branch information
augustjk authored Nov 27, 2023
1 parent eecfce5 commit 2da6dd1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/lit-dev-content/site/docs/v2/tools/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You should also create a README describing how to consume your component.

## Publishing modern JavaScript

We recommend publishing JavaScript modules in standard [ES2019](https://kangax.github.io/compat-table/es2016plus/) syntax, as this is supported on all evergreen browsers and results in the fastest and smallest JavaScript. Users of your package can always use a compiler to support older browsers, but they can't transform legacy JavaScript to modern syntax if you pre-compile your code before publishing.
We recommend publishing JavaScript modules in standard [ES2019](https://compat-table.github.io/compat-table/es2016plus/) syntax, as this is supported on all evergreen browsers and results in the fastest and smallest JavaScript. Users of your package can always use a compiler to support older browsers, but they can't transform legacy JavaScript to modern syntax if you pre-compile your code before publishing.

However, it is important that if you are using newly proposed or non-standard JavaScript features such as TypeScript, decorators, and class fields, you _should_ compile those features to standard ES2019 supported natively in browsers before publishing to npm.

Expand Down
2 changes: 1 addition & 1 deletion packages/lit-dev-content/site/docs/v3/tools/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You should also create a README describing how to consume your component.

## Publishing modern JavaScript

We recommend publishing JavaScript modules in standard [ES2021](https://kangax.github.io/compat-table/es2016plus/) syntax, as this is supported on all evergreen browsers and results in the fastest and smallest JavaScript. Users of your package can always use a compiler to support older browsers, but they can't transform legacy JavaScript to modern syntax if you pre-compile your code before publishing.
We recommend publishing JavaScript modules in standard [ES2021](https://compat-table.github.io/compat-table/es2016plus/) syntax, as this is supported on all evergreen browsers and results in the fastest and smallest JavaScript. Users of your package can always use a compiler to support older browsers, but they can't transform legacy JavaScript to modern syntax if you pre-compile your code before publishing.

However, it is important that if you are using newly proposed or non-standard JavaScript features such as TypeScript, decorators, and class fields, you _should_ compile those features to standard ES2021 supported natively in browsers before publishing to npm.

Expand Down
1 change: 0 additions & 1 deletion packages/lit-dev-tests/known-good-urls.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ https://jasmine.github.io/
https://modern-web.dev/guides/test-runner/getting-started
https://www.npmjs.com/
https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
https://kangax.github.io/compat-table/es2016plus/
https://github.com/WICG/webcomponents/blob/gh-pages/proposals/Scoped-Custom-Element-Registries.md
https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry
https://github.com/webcomponents/gold-standard/wiki
Expand Down

0 comments on commit 2da6dd1

Please sign in to comment.