@bingtsingw/mrm-preset
v0.11.1
Published
Common tasks for Mrm
Downloads
167
Readme
@bingtsingw/mrm-preset
mrm preset to keep configuration files in-sync and consistent across various projects. Highly inspired by mrm-preset-default and @adonisjs/mrm-preset.
:white_check_mark: This project is configured by itself.
:warning: This documentation uses @antfu/ni for npm operations.
Usage
$ 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
Tasks
MIT License
Re-Create LICENSE
file inside the project root.
$ nr mrm mit
Editorconfig
Remove and Re-Create a .editorconfig
file inside the project root.
$ nr mrm editorconfig
Git Ignore
Re-Create .gitignore
file inside the project root.
$ nr mrm gitignore
Typescript
- Create
tsconfig.json
(DO NOT add any configuration) - Update
.vscode/settings.json
to support typescript - install
typescript
,@types/node
$ nr mrm typescript
Release-it
- Add
.release-it.json
- Add
release
npm scripts - Add
release-it
and@release-it/conventional-changelog
$ nr mrm release-it
VSCode
Create a .vscode/settings.json
file to set basic editor settings.
$ nr mrm vscode
Husky
- Remove current
.husky
folder - Add
husky
package and runnpx husky install
$ nr mrm husky
Lint-Staged
- Remove all
.lintstaged
configs - Add
lint-staged
package and add huskypre-commit
hook
$ nr mrm lint-staged
Commitizen
- Remove all
commitizen
configs - Add
commitizen
packages and configs - Install husky hook if exists
$ nr mrm commitizen
Prettier
- 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
Prisma
- Add
prisma
package and script - Init
prisma
and adddiff.sh
$ nr mrm prisma