Skip to content

Commit

Permalink
feat: lint format and other scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
benpsnyder committed May 10, 2024
1 parent 00b6af1 commit 3624daf
Show file tree
Hide file tree
Showing 17 changed files with 620 additions and 47 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ node_modules/
test-results/
bun.lockb
.nx
dist
*.log
1 change: 0 additions & 1 deletion commitlint.config.js

This file was deleted.

1 change: 1 addition & 0 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default { extends: ['@commitlint/config-lerna-scopes'] };
36 changes: 21 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{
"name": "bigcapital-monorepo",
"private": true,
"type": "module",
"scripts": {
"build": "lerna run build",
"build:server": "lerna run build --scope \"@bigcapital/server\"",
"build:webapp": "lerna run build --scope \"@bigcapital/webapp\"",
"dev": "lerna run dev",
"dev:server": "lerna run dev --scope \"@bigcapital/server\"",
"dev:webapp": "lerna run dev --scope \"@bigcapital/webapp\"",
"dev:website": "lerna run dev --scope \"@bigcapital/website\"",
"format": "lerna run format --scope \"@bigcapital/webapp\" --scope \"@bigcapital/server\" --scope \"@bigcapital/website\"",
"lint": "lerna run lint --scope \"@bigcapital/webapp\" --scope \"@bigcapital/server\" --scope \"@bigcapital/website\"",
"build": "bun run build:server & bun run build:webapp",
"build:server": "bun --bun nx run server:build",
"build:webapp": "bun --bun nx run webapp:build",
"build:website": "bun --bun nx run website:build",
"dev": "bun run dev:server & bun run dev:webapp",
"dev:server": "bun --bun nx run server:serve",
"dev:webapp": "bun --bun nx run webapp:serve",
"dev:website": "bun --bun nx run website:serve",
"format": "bun i && bun --bun nx run-many --all --target=format",
"install:packages": "bun i && bun --bun nx run-many --all --target=install",
"lint": "bun i && bun --bun nx run-many --all --target=lint",
"prepare": "husky install",
"serve:server": "lerna run serve --scope \"@bigcapital/server\"",
"test:e2e": "playwright test"
Expand All @@ -22,17 +25,20 @@
},
"devDependencies": {
"@biomejs/biome": "^1.7.3",
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@commitlint/config-lerna-scopes": "^17.4.2",
"@faker-js/faker": "^8.0.2",
"@playwright/test": "^1.32.3",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@commitlint/config-lerna-scopes": "^19.0.0",
"@faker-js/faker": "^8.4.1",
"@playwright/test": "^1.44.0",
"bun-types": "^1.1.7",
"gulp": "^4.0.2",
"gulp-sass": "^5.0.0",
"gulp-sass": "^5.1.0",
"husky": "^9.0.11",
"nx": "^19.0.2"
},
"peerDependencies": {
"typescript": "beta"
},
"engines": {
"bun": ">=1",
"node": "please-use-bun",
Expand Down
5 changes: 1 addition & 4 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@
},
"scripts": {
"inspect": "cross-env NODE_PATH=./src nodemon src/server.ts",
"clear": "rimraf build",
"format": "biome format --write ./",
"lint": "biome check --apply ./",
"dev": "bun run serve",
"serve": "bun run index.ts --watch",
"lint:eslint": "eslint --fix ./**/*.ts"
"dev": "bun run serve"
},
"dependencies": {
"@casl/ability": "^5.4.3",
Expand Down
28 changes: 24 additions & 4 deletions packages/server/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,35 @@
"sourceRoot": "packages/server/src",
"tags": ["stack:edge", "lang:typescript", "framework:express"],
"targets": {
"install": {
"executor": "nx:run-commands",
"options": {
"commands": ["cd packages/server && bun i"],
"parallel": false
}
},
"format": {
"executor": "nx:run-commands",
"options": {
"commands": ["cd packages/server && bun --bun format"],
"parallel": false
}
},
"lint": {
"executor": "nx:run-commands",
"options": {
"commands": ["cd packages/server && bun --bun lint"],
"parallel": false
}
},
"build": {
"configurations": {
"production": {}
},
"executor": "nx:run-commands",
"options": {
"commands": [
"bun build --compile --sourcemap packages/server/src/index.ts --outfile dist/packages/server/YACS.Server.bun --target bun"
"cd packages/server && bun build --compile --sourcemap ./src/index.ts --outfile ../../dist/packages/server/YACS.Server.bun --target bun"
],
"parallel": false
}
Expand All @@ -24,9 +45,8 @@
"executor": "nx:run-commands",
"options": {
"commands": [
"gulp --gulpfile=scripts/gulpfile.cjs styles styles-rtl",
"cross-env NODE_ENV=production bun build packages/server/src/index.ts --outdir build/server --target bun",
"cross-env NODE_ENV=production bun build packages/server/src/commands/index.ts --outdir build/commands --target bun"
"cd packages/server && gulp --gulpfile=scripts/gulpfile.cjs styles styles-rtl",
"cd packages/server && NODE_ENV=production bun build --compile --sourcemap ./src/commands/index.ts --outfile ../../dist/packages/server/YACS.Server.Commands.bun --target bun"
],
"parallel": false
}
Expand Down
Loading

0 comments on commit 3624daf

Please sign in to comment.