lit / lit

Lit is a simple library for building fast, lightweight web components.
https://lit.dev
BSD 3-Clause "New" or "Revised" License
18.77k stars 926 forks source link

[labs/cli] init --lang ts: Should outDir by '.' ? #3540

Open justinfagnani opened 1 year ago

justinfagnani commented 1 year ago

Should this be an RFC?

Which package is this a feature request for?

Other/unknown (please mention in description)

Description

I think we should consider making the outDir in new TS projects be ".", for two reasons:

  1. Imports to standalone elements are simpler: just import 'my-package/my-element.js' instead of import 'my-package/lib/my-element.js'
  2. When new code is added to the src/ folder, it be be built to outside of lib/. For instance, Storybook 7 adds a src/stories/ folder, which right now is output to /lib/stories, but would probably be better as just stories/ so that it's not published to npm by default, has a shorter URL, etc.

Alternatives and Workarounds

Manually changing the outDir

justinfagnani commented 1 year ago

cc @e111077