Skip to content

Commit

Permalink
chore: find out
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregoor committed Oct 12, 2024
1 parent 995ed37 commit 97acb62
Show file tree
Hide file tree
Showing 7 changed files with 6,856 additions and 1,574 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,17 @@ jobs:
- run: pnpm build

release:
needs: [check-style, lint, test, build]
# needs: [check-style, lint, test, build]
runs-on: ubuntu-latest
defaults:
run:
working-directory: lib
if: github.ref == 'refs/heads/main'
# if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/node
with:
node-version: 18.x
- uses: go-semantic-release/action@v1
id: semrel
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
update-file: package.json
allow-initial-development-versions: true
- run: pnpm publish --no-git-checks
if: steps.semrel.outputs.version != ''
- run: pnpm exec nx run my-app:semantic-release --dry-run
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ dist/
.eslintcache
coverage
.idea



.nx/cache
.nx/workspace-data
4 changes: 2 additions & 2 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"scripts": {
"dev": "vite",
"build-lib": "cd ../lib && pnpm build",
"build": "pnpm build-lib && tsc -b && vite build",
"preview": "vite preview"
"build": "pnpm build-lib && tsc -b && nx vite:build",
"preview": "nx vite:preview"
},
"dependencies": {
"react": "^18.3.1",
Expand Down
19 changes: 16 additions & 3 deletions lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"author": "Gregor Weber<[email protected]>",
"license": "MIT",
"scripts": {
"test": "vitest --coverage --silent=false --reporter=basic",
"test": "nx vite:test --coverage --silent=false --reporter=basic",
"build": "rm -rf dist && pnpm tsc && cp schema.zodex.json dist/schema.zodex.json && tsup index.ts --format esm --legacy-output",
"prepublish": "pnpm run build"
},
Expand All @@ -34,5 +34,18 @@
},
"files": [
"dist/*"
]
}
],
"nx": {
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"github": true,
"changelog": true,
"npm": true,
"tagFormat": "v${VERSION}"
}
}
}
}
}
36 changes: 36 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"build": {
"outputs": ["{projectRoot}/lib/dist"],
"cache": true
},
"test": {
"outputs": ["{projectRoot}/lib/coverage"],
"cache": true
}
},
"defaultBase": "main",
"plugins": [
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "lint"
}
},
{
"plugin": "@nx/vite/plugin",
"options": {
"buildTargetName": "vite:build",
"testTargetName": "vite:test",
"serveTargetName": "serve",
"previewTargetName": "vite:preview",
"serveStaticTargetName": "serve-static",
"typecheckTargetName": "typecheck"
}
}
],
"release": {
"projects": ["zodex"]
}
}
15 changes: 13 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,24 @@
"devDependencies": {
"@commitlint/cli": "19.4.1",
"@commitlint/config-conventional": "19.4.1",
"@nx/eslint": "20.0.0",
"@nx/vite": "20.0.0",
"@nx/web": "20.0.0",
"@theunderscorer/nx-semantic-release": "^2.12.0",
"@vitest/ui": "^1.3.1",
"eslint": "9.9.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0",
"husky": "9.1.5",
"lint-staged": "15.2.10",
"nx": "20.0.0",
"prettier": "2.8.8",
"typescript": "5.5.4",
"typescript-eslint": "8.4.0"
"typescript-eslint": "8.4.0",
"vite": "^5.0.0",
"vitest": "^1.3.1"
},
"packageManager": "[email protected]",
"pnpm": {
Expand All @@ -33,5 +41,8 @@
"lint-staged": {
"*.ts": "eslint --cache --fix .",
"*.{ts,js,json,md}": "prettier --write"
},
"nxrelease": {
"repositoryUrl": "https://github.com/commonbaseapp/zodex"
}
}
}
Loading

0 comments on commit 97acb62

Please sign in to comment.