Skip to content

Commit 3624daf

Browse files
committed
feat: lint format and other scripts
1 parent 00b6af1 commit 3624daf

17 files changed

+620
-47
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ node_modules/
99
test-results/
1010
bun.lockb
1111
.nx
12+
dist
13+
*.log

commitlint.config.js

-1
This file was deleted.

commitlint.config.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default { extends: ['@commitlint/config-lerna-scopes'] };

package.json

+21-15
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
{
22
"name": "bigcapital-monorepo",
33
"private": true,
4+
"type": "module",
45
"scripts": {
5-
"build": "lerna run build",
6-
"build:server": "lerna run build --scope \"@bigcapital/server\"",
7-
"build:webapp": "lerna run build --scope \"@bigcapital/webapp\"",
8-
"dev": "lerna run dev",
9-
"dev:server": "lerna run dev --scope \"@bigcapital/server\"",
10-
"dev:webapp": "lerna run dev --scope \"@bigcapital/webapp\"",
11-
"dev:website": "lerna run dev --scope \"@bigcapital/website\"",
12-
"format": "lerna run format --scope \"@bigcapital/webapp\" --scope \"@bigcapital/server\" --scope \"@bigcapital/website\"",
13-
"lint": "lerna run lint --scope \"@bigcapital/webapp\" --scope \"@bigcapital/server\" --scope \"@bigcapital/website\"",
6+
"build": "bun run build:server & bun run build:webapp",
7+
"build:server": "bun --bun nx run server:build",
8+
"build:webapp": "bun --bun nx run webapp:build",
9+
"build:website": "bun --bun nx run website:build",
10+
"dev": "bun run dev:server & bun run dev:webapp",
11+
"dev:server": "bun --bun nx run server:serve",
12+
"dev:webapp": "bun --bun nx run webapp:serve",
13+
"dev:website": "bun --bun nx run website:serve",
14+
"format": "bun i && bun --bun nx run-many --all --target=format",
15+
"install:packages": "bun i && bun --bun nx run-many --all --target=install",
16+
"lint": "bun i && bun --bun nx run-many --all --target=lint",
1417
"prepare": "husky install",
1518
"serve:server": "lerna run serve --scope \"@bigcapital/server\"",
1619
"test:e2e": "playwright test"
@@ -22,17 +25,20 @@
2225
},
2326
"devDependencies": {
2427
"@biomejs/biome": "^1.7.3",
25-
"@commitlint/cli": "^17.4.2",
26-
"@commitlint/config-conventional": "^17.4.2",
27-
"@commitlint/config-lerna-scopes": "^17.4.2",
28-
"@faker-js/faker": "^8.0.2",
29-
"@playwright/test": "^1.32.3",
28+
"@commitlint/cli": "^19.3.0",
29+
"@commitlint/config-conventional": "^19.2.2",
30+
"@commitlint/config-lerna-scopes": "^19.0.0",
31+
"@faker-js/faker": "^8.4.1",
32+
"@playwright/test": "^1.44.0",
3033
"bun-types": "^1.1.7",
3134
"gulp": "^4.0.2",
32-
"gulp-sass": "^5.0.0",
35+
"gulp-sass": "^5.1.0",
3336
"husky": "^9.0.11",
3437
"nx": "^19.0.2"
3538
},
39+
"peerDependencies": {
40+
"typescript": "beta"
41+
},
3642
"engines": {
3743
"bun": ">=1",
3844
"node": "please-use-bun",

packages/server/package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@
1010
},
1111
"scripts": {
1212
"inspect": "cross-env NODE_PATH=./src nodemon src/server.ts",
13-
"clear": "rimraf build",
1413
"format": "biome format --write ./",
1514
"lint": "biome check --apply ./",
16-
"dev": "bun run serve",
17-
"serve": "bun run index.ts --watch",
18-
"lint:eslint": "eslint --fix ./**/*.ts"
15+
"dev": "bun run serve"
1916
},
2017
"dependencies": {
2118
"@casl/ability": "^5.4.3",

packages/server/project.json

+24-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,35 @@
55
"sourceRoot": "packages/server/src",
66
"tags": ["stack:edge", "lang:typescript", "framework:express"],
77
"targets": {
8+
"install": {
9+
"executor": "nx:run-commands",
10+
"options": {
11+
"commands": ["cd packages/server && bun i"],
12+
"parallel": false
13+
}
14+
},
15+
"format": {
16+
"executor": "nx:run-commands",
17+
"options": {
18+
"commands": ["cd packages/server && bun --bun format"],
19+
"parallel": false
20+
}
21+
},
22+
"lint": {
23+
"executor": "nx:run-commands",
24+
"options": {
25+
"commands": ["cd packages/server && bun --bun lint"],
26+
"parallel": false
27+
}
28+
},
829
"build": {
930
"configurations": {
1031
"production": {}
1132
},
1233
"executor": "nx:run-commands",
1334
"options": {
1435
"commands": [
15-
"bun build --compile --sourcemap packages/server/src/index.ts --outfile dist/packages/server/YACS.Server.bun --target bun"
36+
"cd packages/server && bun build --compile --sourcemap ./src/index.ts --outfile ../../dist/packages/server/YACS.Server.bun --target bun"
1637
],
1738
"parallel": false
1839
}
@@ -24,9 +45,8 @@
2445
"executor": "nx:run-commands",
2546
"options": {
2647
"commands": [
27-
"gulp --gulpfile=scripts/gulpfile.cjs styles styles-rtl",
28-
"cross-env NODE_ENV=production bun build packages/server/src/index.ts --outdir build/server --target bun",
29-
"cross-env NODE_ENV=production bun build packages/server/src/commands/index.ts --outdir build/commands --target bun"
48+
"cd packages/server && gulp --gulpfile=scripts/gulpfile.cjs styles styles-rtl",
49+
"cd packages/server && NODE_ENV=production bun build --compile --sourcemap ./src/commands/index.ts --outfile ../../dist/packages/server/YACS.Server.Commands.bun --target bun"
3050
],
3151
"parallel": false
3252
}

0 commit comments

Comments
 (0)