Code Monkey home page Code Monkey logo

Comments (10)

lorefnon avatar lorefnon commented on May 28, 2024 3

Ok cool. Looks like everyone is on the same page then.

I can take this up mid next week.

from civet.

edemaine avatar edemaine commented on May 28, 2024 1

An update on this: if you use Vite, Rollup, ESBuild, or Webpack to build your Civet code, our new unplugin for these systems now has a typecheck: true option that will do typechecking. So we now have a reasonable way to do type checking in CLI!

from civet.

edemaine avatar edemaine commented on May 28, 2024 1

We should try to extract the typecheck: true feature from the unplugin into a module that the CLI could directly call. This would still require installing typescript locally (or globally?), but would make it easy to integrate into the existing CLI with a command-line option like civet --typecheck or civet -t.

from civet.

edemaine avatar edemaine commented on May 28, 2024

Agreed. I was imagining a civetsc CLI tool (or something like that) that runs TypeScript on the transpiled files, following tsconfig.json (or maybe even tsconfig.civet?).

Perhaps it should be a second bin for the main Civet package. Or perhaps it should be its own NPM package, given that it would have a typescript peer dependency?

from civet.

lorefnon avatar lorefnon commented on May 28, 2024

runs TypeScript on the transpiled files

That may not be a great idea. Ideally we'd non-interactively do what the lsp client already does so that any errors etc. have correct source line numbers.

@STRd6 Are you open to bin/civettsc (or maybe just civetc) ? I think keeping this outside may be a maintenance burden because I think tsserver integration is still early and keeping the two in sync may need more work.

from civet.

edemaine avatar edemaine commented on May 28, 2024

I agree that this should be part of this repo (but maybe separate NPM package), and wyen I said "run TypeScript" I meant the same thing as the LSP (not running tsc).

from civet.

STRd6 avatar STRd6 commented on May 28, 2024

Having an additional civetc build product in bin makes sense. I also agree that making use of the same TSServer wrapping is important so that the editor error messages match the cli error messages exactly. I'm in support of anyone who wants to work towards this.

from civet.

STRd6 avatar STRd6 commented on May 28, 2024

Feel free to refactor out the TSServer wrapping from lsp into a shared lib if it makes things easier.

from civet.

danielbayley avatar danielbayley commented on May 28, 2024

Surely the bin should be called tscivet… or tscvt?

from civet.

edemaine avatar edemaine commented on May 28, 2024

I guess it's a tradeoff on whether to have just one bin or multiple. I don't have a strong feeling, but most of the code would be shared with the CLI so I think allowing for civet -t at least makes sense. We could also add an alias of tscivet or civetsc if we want.

from civet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.