Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comments to docs that cover dev mode warnings #467

Open
arthurevans opened this issue Sep 1, 2021 · 1 comment · Fixed by #468
Open

Add comments to docs that cover dev mode warnings #467

arthurevans opened this issue Sep 1, 2021 · 1 comment · Fixed by #468

Comments

@arthurevans
Copy link
Contributor

The shortlinks in #465 redirect to sections that explain specific issues that devmode warns about. There should be a comment in each of these locations so the hapless editor (ahem) knows to consider this factor rearranging docs.

We also probably need a policy about how to handle these over time. i.e., if Lit 3 eliminates a problem or adds a different solution for it, we still need to keep the Lit 2 shortlink (and associated doc) alive.

aomarks added a commit that referenced this issue Sep 1, 2021
Custom script for checking lit.dev redirects.

It would be nice if we could use the 3rd party link checker we already have for this somehow, but it doesn't support checking for anchors (see stevenvachon/broken-link-checker#108 -- understandable since it would require DOM parsing) which is one of the main failure cases.

Fixes #467 (since we shouldn't need comments if we have the redirects checked in CI).

As part of this, I created a new lit-dev-tools-esm package.

The existing lit-dev-tools package is currently CommonJS, because mostly it is used for Eleventy plugins, and Eleventy doesn't support ES modules (11ty/eleventy#836).

We want ES modules for this new redirect checker script, because it needs to import some ES modules, and that is difficult to do with TypeScript, because TypeScript doesn't allow emitting an actual import statement, which is how CommonJS -> ESM interop works (microsoft/TypeScript#43329).

We also can't really have a mix of CommonJS and ESM in the same package, because the {"type": "module"} field has to be set to one or the other in the package.json. We could use .mjs extensions, but TypeScript won't emit those.

So the simplest solution seems to be to just have two packages.
@arthurevans
Copy link
Contributor Author

It may be overkill, but I want to add comments where we link to the main docs. Reopening to track those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant