lit.dev icon indicating copy to clipboard operation
lit.dev copied to clipboard

Improve build process docs

Open moniuch opened this issue 1 year ago • 0 comments

Please improve the documentation pages regarding building and publishing of multiple components. https://lit.dev/docs/tools/publishing/

This current example

{
  "type": "module",
  "main": "my-element.js",
  "module": "my-element.js"
}

is very simplistic and doesn't guide a beginning developer in building several components out of a project in one go.

Example:

I have a repository containing a whole library of components (say: my-button, my-item-skeleton, my-tabs) and I am ready to give them a go in my target environment/framework. My questions would be:

  1. How do I publish all of them in one go? (My expectation is that I will get a bunch of individual files, one per component).
  2. How do I have control over what I build?
  3. I would like to skip the npm publish step, as my pipeline will probably be held internally.
  4. Do I need to write/export any loaders?
  5. How do I export .d.ts files?

Since I am beginner to LitElement, I will most likely have to do a lot of repetitive tasks before a steady process with good DX settles down. That's why I expect this process to be as much automated as possible, without manual fiddling with the package.json contents.

moniuch avatar Sep 11 '22 09:09 moniuch