mrm preset to keep configuration files in-sync and consistent across various projects. Highly inspired by mrm-preset-default and @adonisjs/mrm-preset.
✅ This project is configured by itself.
⚠️ This documentation uses @antfu/ni for npm operations.
$ ni mrm @bingtsingw/mrm-preset -D
Add script to package.json file
{
"scripts": {
"mrm": "mrm --preset=@bingtsingw/mrm-preset"
}
}
Or use only one command
$ ni mrm @bingtsingw/mrm-preset -D && jq '.scripts += { mrm: "mrm --preset=@bingtsingw/mrm-preset" }' package.json > package.tmp && mv package.tmp package.json
Re-Create LICENSE
file inside the project root.
$ nr mrm mit
Remove and Re-Create a .editorconfig
file inside the project root.
$ nr mrm editorconfig
Re-Create .gitignore
file inside the project root.
$ nr mrm gitignore
- Create
tsconfig.json
(DO NOT add any configuration) - Update
.vscode/settings.json
to support typescript - install
typescript
,@types/node
$ nr mrm typescript
- Add
.release-it.json
- Add
release
npm scripts - Add
release-it
and@release-it/conventional-changelog
$ nr mrm release-it
Create a .vscode/settings.json
file to set basic editor settings.
$ nr mrm vscode
- Remove current
.husky
folder - Add
husky
package and runnpx husky install
$ nr mrm husky
- Remove all
.lintstaged
configs - Add
lint-staged
package and add huskypre-commit
hook
$ nr mrm lint-staged
- Remove all
commitizen
configs - Add
commitizen
packages and configs - Install husky hook if exists
$ nr mrm commitizen
- Remove all prettier config files
- Add
.prettierrc.json
and.prettierignore
file - Update
.vscode/settings.json
settings - Add
package.json
scripts - install
prettier
- install
prettier-plugin-organize-imports
if in a typescript project
- install
$ nr mrm prettier
- Add
prisma
package and script - Init
prisma
and adddiff.sh
$ nr mrm prisma