Skip to content

Commit

Permalink
refactor: Follow Conventional Scripts (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
bennycode authored Jul 12, 2023
1 parent 16dd53e commit 6b3bd19
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ updates:
separator: '-'
open-pull-requests-limit: 99
target-branch: 'main'
ignore:
- dependency-name: 'husky'
versions:
- '>= 5'
commit-message:
prefix: 'chore'
include: 'scope'
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ Using this template, you can build **standalone apps**, **libraries** and/or **C
1. **Config formatting** powered by [Prettier](https://prettier.io/)
1. **Continuous integration pipeline** powered by [GitHub Actions workflows](https://docs.github.com/en/actions/using-workflows)
1. **Cross-platform compatibility** powered by [cross-env](https://github.com/kentcdodds/cross-env)
1. **Dependency management** powered by [yarn](https://yarnpkg.com/)
1. **Dependency management** powered by [npm](https://www.npmjs.com/)
1. **Distribution pipeline** powered by [npm](https://www.npmjs.com/)
1. **Static code analysis** powered by [ESLint](https://eslint.org/)
1. **Testing & code coverage** powered by [Jest](https://jestjs.io/)
1. **Type checking** powered by [TypeScript](https://www.typescriptlang.org/)
1. **Streamlined scripts** powered by [Conventional Scripts](https://conventionalscripts.org/)

## Usage

Expand All @@ -26,7 +27,7 @@ Using this template, you can build **standalone apps**, **libraries** and/or **C
1. Replace all occurrences of "bennycode" with your own username (or organization name)
2. Replace all occurrences of "ts-node-starter" with your project name (or repository name)
3. Start writing your code in the ["src" directory](./src)
4. Run `yarn` and be happy! 😊
4. Run `npm install` and be happy! 😊

### Build a standalone app

Expand Down
4 changes: 2 additions & 2 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pre-commit:
parallel: false
commands:
1_prettier:
run: yarn pretty-quick --staged --ignore-path .gitignore
run: npx pretty-quick --staged --ignore-path .gitignore
2_eslint:
glob: '*.{js,jsx,ts,tsx}'
run: yarn eslint {staged_files} --fix
run: npx eslint {staged_files} --fix
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@
},
"scripts": {
"build": "tsc",
"changelog:commit": "git add CHANGELOG.md && git commit -m \"docs: updated CHANGELOG.md\"",
"check": "npm run check:format -- --list-different && npm run check:lint",
"check:format": "prettier --ignore-path .gitignore --loglevel error .",
"check:lint": "eslint --ignore-path .gitignore --ext .js,.jsx,.ts,.tsx --no-error-on-unmatched-pattern .",
"clean": "rimraf .nyc_output coverage dist",
"debug": "node --inspect -r ts-node/register ./src/start.ts",
"dist": "npm run clean && npm run build",
"fix": "npm run fix:config && npm run fix:code",
"fix:code": "npm run lint:code --fix --quiet",
"fix:config": "npm run prettier --write",
"lint": "npm run lint:code && npm run lint:config",
"lint:code": "eslint --ignore-path .gitignore --ext .js,.jsx,.ts,.tsx --no-error-on-unmatched-pattern .",
"lint:config": "npm run prettier --list-different",
"deploy": "exit 0",
"dev": "node --inspect -r ts-node/register ./src/start.ts",
"docs": "exit 0",
"fix": "npm run fix:format && npm run fix:lint",
"fix:format": "npm run check:format --write",
"fix:lint": "npm run check:lint --fix --quiet",
"log": "git add CHANGELOG.md && git commit -m \"docs: updated CHANGELOG.md\"",
"postversion": "git push origin && git push origin --tags && npm publish --access public",
"prettier": "prettier --ignore-path .gitignore --loglevel error .",
"preversion": "git checkout main && git pull && npm run && npm run test && npm run dist",
"release:major": "generate-changelog -M -x \"chore,test\" && npm run changelog:commit && npm version major",
"release:minor": "generate-changelog -m -x \"chore,test\" && npm run changelog:commit && npm version minor",
"release:patch": "generate-changelog -p -x \"chore,test\" && npm run changelog:commit && npm version patch",
"release:major": "generate-changelog -M -x \"chore,test\" && npm run log && npm version major",
"release:minor": "generate-changelog -m -x \"chore,test\" && npm run log && npm version minor",
"release:patch": "generate-changelog -p -x \"chore,test\" && npm run log && npm version patch",
"start": "ts-node ./src/start.ts",
"test": "npm run test:types && npm run test:unit:coverage",
"test:types": "tsc --noEmit",
Expand Down

0 comments on commit 6b3bd19

Please sign in to comment.