Skip to content

Commit

Permalink
feat: ✨ add nx-semantic-release setup
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideSegullo committed Mar 8, 2023
1 parent 0a37cee commit 64e4acc
Show file tree
Hide file tree
Showing 7 changed files with 1,525 additions and 23 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-conventional"],
"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
24 changes: 24 additions & 0 deletions .nxreleaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"changelog": true,
"npm": true,
"github": true,
"repositoryUrl": "https://github.com/nabla-studio/cosmos-txs-tracer",
"branches": [
"main",
{
"name": "next",
"channel": "next",
"prerelease": true
},
{
"name": "beta",
"channel": "beta",
"prerelease": true
},
{
"name": "alpha",
"channel": "alpha",
"prerelease": true
}
]
}
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"name": "cosmos-txs-tracer",
"version": "0.0.0",
"license": "MIT",
"scripts": {},
"scripts": {
"prepare": "husky install"
},
"private": true,
"dependencies": {
"@babel/core": "^7.21.0",
Expand Down Expand Up @@ -46,6 +48,8 @@
"devDependencies": {
"@babel/preset-react": "^7.14.5",
"@chain-registry/types": "^0.14.0",
"@commitlint/cli": "^17.0.0",
"@commitlint/config-conventional": "^17.0.0",
"@emotion/babel-plugin": "11.10.6",
"@nrwl/cypress": "15.8.5",
"@nrwl/eslint-plugin-nx": "15.7.2",
Expand All @@ -57,6 +61,7 @@
"@nrwl/vite": "15.7.2",
"@nrwl/workspace": "15.7.2",
"@testing-library/react": "14.0.0",
"@theunderscorer/nx-semantic-release": "^2.0.1",
"@types/jest": "^29.4.0",
"@types/node": "18.14.2",
"@types/react": "18.0.28",
Expand All @@ -78,6 +83,7 @@
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "^8.0.0",
"jest": "^29.4.1",
"jest-environment-jsdom": "^29.4.1",
"jsdom": "~20.0.3",
Expand Down
12 changes: 10 additions & 2 deletions packages/txs-tracer-core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"name": "@nabla-studio/txs-tracer-core",
"version": "0.0.1",
"type": "module"
"version": "0.0.0-semantic-release",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/nabla-studio/cosmos-txs-tracer.git",
"directory": "packages/txs-tracer-core"
},
"bugs": {
"url": "https://github.com/nabla-studio/cosmos-txs-tracer/issues"
}
}
33 changes: 27 additions & 6 deletions packages/txs-tracer-core/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,56 @@
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"outputs": ["{options.outputPath}"],
"outputs": [
"{options.outputPath}"
],
"options": {
"outputPath": "dist/packages/txs-tracer-core",
"main": "packages/txs-tracer-core/src/index.ts",
"tsConfig": "packages/txs-tracer-core/tsconfig.lib.json",
"assets": ["packages/txs-tracer-core/*.md"]
"assets": [
"packages/txs-tracer-core/*.md"
]
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "node tools/scripts/publish.mjs txs-tracer-core {args.ver} {args.tag}"
},
"dependsOn": ["build"]
"dependsOn": [
"build"
]
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"outputs": [
"{options.outputFile}"
],
"options": {
"lintFilePatterns": ["packages/txs-tracer-core/**/*.ts"]
"lintFilePatterns": [
"packages/txs-tracer-core/**/*.ts"
]
}
},
"test": {
"executor": "@nrwl/vite:test",
"outputs": ["coverage/packages/txs-tracer-core"],
"outputs": [
"coverage/packages/txs-tracer-core"
],
"options": {
"passWithNoTests": true,
"reportsDirectory": "../../coverage/packages/txs-tracer-core"
}
},
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"github": true,
"changelog": true,
"npm": true,
"tagFormat": "txs-tracer-core-v${VERSION}"
}
}
},
"tags": []
Expand Down
Loading

0 comments on commit 64e4acc

Please sign in to comment.