gohypergiant / standard-toolkit

The web "standard library" for the Accelint family of systems.
Apache License 2.0
0 stars 0 forks source link

IDEA: Convert indexer script into CLI package #67

Open ArrayKnight opened 2 days ago

ArrayKnight commented 2 days ago

It would be nice to be able to use the indexer script in a slightly more generic manner which is targeted at JS/TS export collating.

My desired features:

Examples:

O: src/index.ts I: **/*.{ts,tsx}
O: src/index.ts I: **/index.{ts,tsx} (similar to current --barrel flag)
O: src/components/index.ts I: */index.ts
O: src/vanilla.ts I: **/*.css.ts, **/types.ts, ./types/*.ts, ./styles/*.ts, ./utils/css.ts
exclude: ['**/*.{spec,stories,test}.*']
ArrayKnight commented 1 day ago

image Thanks, @belsrc

Clarity on the scope of deduping:

ArrayKnight commented 1 day ago

We also talked about having an option in the config that allows for a custom formatter (Biome, Prettier, etc) to be run against the file contents before write

belsrc commented 1 day ago

Thinking about that....I think we could probably just handle it like the extensions. postprocessing or something. Leave it for the user to decide. At that point, it would just be receiving essentially a js/ts file body content which is what most expect when they are used from inside code?

belsrc commented 16 hours ago

Unless you have a different opinion, I'm just going to self assign this @ArrayKnight