Live data from Hacker News

Show HN: Crust – A CLI framework for TypeScript and Bun

github.com

31–40 of 48 posts

Re: Show HN: Crust – A CLI framework for TypeScript and Bun

#32

Earlier quoted context omitted.

Hi, the comment I left in README.md is just to warn user that do expect breaking changes before 1.0 for THIS PROJECT specifically. there is no implication that semver as a standard is promoting arbitrary changes/version before 1.0.

I get that, and it's a nice thing to warn users about. My nitpick was merely about the specific "do not strictly follow semantic versioning" phrasing. There's nothing you can do in a 0.y.z release which doesn't follow the SemVer spec (e.g. your next release could turn the project into a spell checker instead of a CLI framework and you'd still be in compliance).

ohh thank you for pointing that out. I just double checked the semver docs and it makes sense now. Something new I learned today

Re: Show HN: Crust – A CLI framework for TypeScript and Bun

#33

Earlier quoted context omitted.

Both in the frontend and the backend, I've usually used "If it calls your code, it's a framework, if you call its code, it's a library", and would seem to fit here too. An argument parser you'd call from your main method, then do stuff with what it returns. In Crust, it seems you instead setup the command + what will happen when it's called, then let the framework call your code.

That’s… actually a great definition. I’m going to try to retain that.

This is classically called "Inversion of Control"[0] or the "Hollywood Principle"[1] as in "Don't call us-- we'll call you".

[0] - https://martinfowler.com/bliki/InversionOfControl.html [1] - https://wiki.c2.com/?HollywoodPrinciple

Re: Show HN: Crust – A CLI framework for TypeScript and Bun

#36
I was looking for something like this.

Does the help plugin not support color?

Looks like the spacing is messed up too. I just converted my app to use it and its coming out like

``` COMMANDS: export-schemaExport table definitions from existing database to YAML export-dataExport table data in CSV format import-dataImport table data from CSV file schema-sqlConvert YAML schema back to MySQL export-usersExport users in YAML format users-sql Convert users.yaml back into SQL export-allExport all data from host export-all-tgzExport all data from host databases-sqlConvert databases.yaml back into SQL export-typescriptExport TypeScript interfaces ```

i.e. there's no space after `export-schema` it just goes immediately to the description.

Re: Show HN: Crust – A CLI framework for TypeScript and Bun

#37

I’ve been using the jsr:@cliffy/* packages from deno to solve the same problem.

yup yup same. That one's worked well for me. Between that and the deno std, it's nice to have it feel like mostly everything you need is available with very little searching.
Post reply on HN