55 lines
1.3 KiB
Makefile
55 lines
1.3 KiB
Makefile
set shell := ["/usr/bin/fish", "-c"]
|
|
|
|
# Formate le code.
|
|
format:
|
|
bun prettier \
|
|
--cache --cache-location ".cache/prettiercache" \
|
|
--config "cfg/prettier.config.ts" \
|
|
--ignore-path "cfg/prettierignore" \
|
|
--ignore-unknown \
|
|
--parallel-workers 8 \
|
|
--write .
|
|
treefmt \
|
|
--config-file ~/.config/treefmt/treefmt.toml \
|
|
.
|
|
|
|
# Met à jour les dépendances NPM.
|
|
update:
|
|
bun update --interactive
|
|
|
|
# Analyse le code TypeScript avec ESLint et Oxlint.
|
|
lint-js:
|
|
-bun eslint --cache --cache-location ".cache/eslintcache" --config cfg/eslint.config.ts
|
|
-bun --bun oxlint \
|
|
--config cfg/oxlint.config.ts
|
|
|
|
# Analyse le code mort et les dépendances inutilisées du projet.
|
|
find-dead-code:
|
|
-bun --bun knip \
|
|
--cache --cache-location ".cache/knipcache" \
|
|
--strict
|
|
-bun --bun knip \
|
|
--cache --cache-location ".cache/knipcache" \
|
|
--production \
|
|
--strict
|
|
|
|
# Compile le projet.
|
|
build:
|
|
bun tsdown \
|
|
--config "cfg/tsdown.config.ts" \
|
|
--attw --publint
|
|
|
|
# Nettoie le dosiser de compilation.
|
|
clean:
|
|
rm -rf .cache/
|
|
rm -rf bun.lock
|
|
rm -rf node_modules/
|
|
rm -rfv dist/
|
|
|
|
# Nettoie le dossier de cache.
|
|
clean-cache:
|
|
rm -rf .cache/
|
|
|
|
# Publie le paquet sur le registre local.
|
|
publish:
|
|
npm publish --registry http://localhost:4873
|