agilgur5 / agilgur5/ts-library-base

Split configs into their own presets (where possible)

Aberta
#4 0 comentários 0 reações 0 responsáveis Ver no GitHub
kind: internal scope: dependencies
Linguagem predominante
TypeScript
Estrelas
2
Forks
0
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Been meaning to do this for quite a while, so adding a TODO

- [x] `tsconfig.json` -- [`@agilgur5/tsconfig`](https://github.com/agilgur5/tsconfig)
- [ ] `rollup.config.js` -- `@agilgur5/rollup-config`
- There's no standard or convention for this in Rollup (see also https://github.com/jaredpalmer/tsdx/issues/635), but I think I'll just split off a plain config into its own library. That can have all the Rollup plugins as deps so that way the new library only needs to install `rollup` and `@agilgur5/rollup-config`
- If the new library doesn't need to make any adjustments to the config, it could just directly use the config [from a package in `node_modules`](https://rollupjs.org/guide/en/#loading-a-configuration-from-a-node-package) (also, per that doc, `rollup-config-*` seems like the conventional prefix)
- If it does need to make adjustments, can do them in TS and `@agilgur5/rollup-config` can include rpt2 for use as a `configPlugin` for consumers even if it doesn't itself use it.
- Can have multiple configs in that "preset". Default might be ESM-only for LTS Node versions (so no need for multi-format bundles, just one ESM), then a ESM+CJS for libs that need backward-compat or aren't ready to make a breaking change to ESM-only, then a ESM+CJS+min UMD for universal ones with legacy compat (i.e. the same config that's currently here).
- [ ] `babel.config.js` -- `@agilgur5/babel-preset`
- This could also hold library and non-library/[app config](https://github.com/agilgur5/front-end-base) (default for libraries)
- [ ] `jest.config.js` -- `@agilgur5/jest-preset`
- I don't have that much Jest config right now, so this may not be worth at this time
- [ ] `eslint.config.js` -- `@agilgur5/eslint-config`
- I use [`ts-standard`](https://github.com/standard/ts-standard) for now, but may want to add more rules etc on top (e.g. React ones) or add Prettier as well. Could also make my own CLI on top of `standard-engine` as it's relatively easy. Also could just install `ts-standard` for all the deps, but then run `eslint` directly on a config

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.