Skip to content

Commit

Permalink
feat: introduce @jscutlery/semver and git hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
benpsnyder committed Nov 26, 2021
1 parent 0e9edde commit b4ac41a
Show file tree
Hide file tree
Showing 8 changed files with 1,149 additions and 43 deletions.
4 changes: 4 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": ["@commitlint/config-angular"],
"rules": {}
}
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
11 changes: 11 additions & 0 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# clean up each developers local git repo whenever they merge code
git fetch origin --prune && git tag -l | xargs git tag -d && git fetch -t

# its always good to make sure your package.json is sorted :)
npx sort-package-json

# after merging code, new package.json dependencies might be introduced
yarn install
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname $0)/_/husky.sh"

# including this as an example :D
# echo "\n\n\n\n\n\n format your code! \n\n\n\n\n\n" # yarn format
37 changes: 21 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
{
"name": "@srleecode/domain",
"private": true,
"description": "Nrwl nx plugin to allow operations at the domain level",
"author": "Scott Lee",
"license": "MIT",
"homepage": "https://github.com/srleecode/domain",
"license": "MIT",
"author": "Scott Lee",
"scripts": {
"nx": "nx",
"build": "nx build domain",
"e2e": "nx e2e domain-e2e",
"affected": "nx affected",
"affected:apps": "nx affected:apps",
"affected:libs": "nx affected:libs",
"affected:build": "nx affected:build",
"affected:test": "nx affected:test",
"affected:lint": "nx affected:lint",
"affected:e2e": "nx affected:e2e",
"affected:dep-graph": "nx affected:dep-graph",
"affected": "nx affected",
"affected:e2e": "nx affected:e2e",
"affected:libs": "nx affected:libs",
"affected:lint": "nx affected:lint",
"affected:test": "nx affected:test",
"build": "nx build domain",
"dep-graph": "nx dep-graph",
"e2e": "nx e2e domain-e2e",
"format": "nx format:write",
"format:write": "nx format:write",
"format:check": "nx format:check",
"update": "nx migrate latest",
"workspace-generator": "nx workspace-generator",
"dep-graph": "nx dep-graph",
"format:write": "nx format:write",
"help": "nx help",
"publish": "npm run build && npm publish ./dist/packages/domain --access=public"
"nx": "nx",
"prepare": "husky install",
"publish": "npm run build && npm publish ./dist/packages/domain --access=public",
"update": "nx migrate latest",
"workspace-generator": "nx workspace-generator"
},
"private": true,
"dependencies": {
"tslib": "^2.3.1"
},
"devDependencies": {
"@angular-devkit/schematics": "^12.2.1",
"@commitlint/cli": "^15.0.0",
"@commitlint/config-angular": "^15.0.0",
"@jscutlery/cypress-angular": "^0.8.4",
"@jscutlery/semver": "^2.13.3",
"@nrwl/angular": "13.1.3",
"@nrwl/cli": "13.1.3",
"@nrwl/cypress": "13.1.3",
Expand All @@ -52,6 +56,7 @@
"dotenv": "10.0.0",
"eslint": "7.32.0",
"eslint-config-prettier": "8.3.0",
"husky": "^7.0.4",
"jest": "27.2.3",
"prettier": "^2.3.2",
"ts-jest": "27.0.5",
Expand Down
14 changes: 14 additions & 0 deletions project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"root": ".",
"sourceRoot": ".",
"targets": {
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"syncVersions": true,
"baseBranch": "master",
"versionTagPrefix": ""
}
}
}
}
3 changes: 2 additions & 1 deletion workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"e2e-domain-cypress-domain-test": "e2e/domain/cypress/domain-test",
"e2e-domain-front-end-angular": "e2e/domain/front-end/angular",
"e2e-domain-grouping-folder": "e2e/domain/grouping-folder",
"e2e-domain-mock-file": "e2e/domain/mock-file"
"e2e-domain-mock-file": "e2e/domain/mock-file",
"workspace": "."
}
}
Loading

0 comments on commit b4ac41a

Please sign in to comment.