doogu
A wrapper around modern JavaScript tools.
Install
npm i -D doogu
What includes?
This package contains the following dependencies, for development purposes:
- Prettier – An opinionated code formatter
- ESLint – Pluggable JavaScript linter
- SWC – An extensible Rust-based platform for the next generation of fast developer tools
- Typescript – A language for application-scale JavaScript
- Jest – A delightful JavaScript Testing Framework
- chokidar-cli – Fast
cross-platform
command line utility to watch file system changes
Shareable configs
The configuration file that can be use with other projects.
tsconfig
Extending the shareable config for TypeScript in tsconfig.json
file:
{
"extends": "doogu/config/tsconfig.json"
}
eslint
Extending the shareable config for ESLint in package.json
file:
{
"name": "mypackage",
"version": "1.0.0",
"eslintConfig": {
"extends": "./node_modules/doogu/config/eslint.json"
},
"eslintIgnore": ["hello.ts", "world.ts"]
}
prettier
Extending the shareable config for Prettier in package.json
file:
{
"name": "mypackage",
"version": "1.0.0",
"prettier": "doogu/config/prettier.json"
}
Scripts
The commands that can be use in package.json
file:
{
"name": "mypackage",
"version": "1.0.0",
"scripts": {
"start": "npm run build && npm run watch",
"watch": "chokidar \"src/*.ts\" -c \"npm run build\"",
"lint": "tsc --noEmit && eslint \"./src\" --ext \".ts\" --cache --cache-location \"node_modules/.cache/.eslintcache\"",
"build": "swc \"./src\" -d \"dist\" && tsc -d --emitDeclarationOnly --outDir \"dist\"",
"test": "node --experimental-vm-modules --no-warnings ./node_modules/jest/bin/jest.js --verbose",
"coverage": "npm test -- --coverage"
}
}
Contributing
We 💛 issues.
When committing, please conform to the semantic-release commit standards. Please install commitizen
and the adapter globally, if you have not already.
npm i -g commitizen cz-conventional-changelog
Now you can use git cz
or just cz
instead of git commit
when committing. You can also use git-cz
, which is an alias for cz
.
git add . && git cz
Thank you
A project by Stilearning © 2022.