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

[lit-starter-ts] Output files into a directory instead of top level #2617

Open
darvid7 opened this issue Mar 19, 2020 · 4 comments · May be fixed by lit/lit-element-starter-ts#30
Open

[lit-starter-ts] Output files into a directory instead of top level #2617

darvid7 opened this issue Mar 19, 2020 · 4 comments · May be fixed by lit/lit-element-starter-ts#30

Comments

@darvid7
Copy link

darvid7 commented Mar 19, 2020

Hey all,
I think I jumped the gun with lit/lit-element-starter-ts#10, my rationale was outputting files to the top level dir seems harder to maintain and can pollute your workspace when you run npm run build. At the very least it will mean.

  • you need to add 4 items to your .gitignore for every .ts file in your src
  • you top level dir in your workspace gets bloated

I think that is enough reason to want to output the transplied ts into another directory like /build.

We're intentionally putting output files in the top level, as one might if you were writing that JavaScript directly without TypeScript. Placing files in /build simply exposes that there is a build.

I'm not sure im sold on this reasoning since this is a TS starter repo and I don't think people would want to write raw js here.

Would love your thoughts!

@arthurevans
Copy link
Contributor

I think @justinfagnani meant that an end user of a published package shouldn't need to be aware of whether it's written in TypeScript or JavaScript.

@justinfagnani
Copy link
Collaborator

Yep ^

@arthurevans
Copy link
Contributor

I think there are some valid concerns here. The .gitignore and clean script both get kind of gnarly (and would be nigh unmanageable if you had a bunch of TS files).

@arthurevans
Copy link
Contributor

Could have a top-level static index.js (or my-element.js) that just imports build/my-element.js, then the user wouldn't need to think about where it was coming from...

@fvilers fvilers linked a pull request Aug 2, 2020 that will close this issue
kevinpschaaf referenced this issue in lit/lit-element-starter-ts Jan 6, 2021
Interpret paths relative to config file, fix some tsc/npm issues, release v0.1.1
@bicknellr bicknellr changed the title Output files into a directory instead of top level [lit-starter-ts] Output files into a directory instead of top level Mar 4, 2022
@bicknellr bicknellr transferred this issue from lit/lit-element-starter-ts Mar 4, 2022
@sorvell sorvell moved this to 📋 Triaged in Lit Project Board Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Triaged
Development

Successfully merging a pull request may close this issue.

4 participants