Skip to content

Commit bbdbdb4

Browse files
committed
feat: add rslib
1 parent bdc7f95 commit bbdbdb4

File tree

8 files changed

+610
-30
lines changed

8 files changed

+610
-30
lines changed

.gitignore

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Local
2+
.DS_Store
3+
*.local
4+
*.log*
5+
6+
# Dist
17
node_modules
2-
dist
3-
coverage
8+
dist/
9+
coverage
10+
storybook-static
11+
12+
# IDE
13+
.vscode/*
14+
!.vscode/extensions.json
15+
.idea

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Tools
2+
3+
### Biome
4+
5+
- Run `npm run lint` to lint your code
6+
- Run `npm run format` to format your code

biome.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.2.6/schema.json",
3+
"assist": {
4+
"actions": {
5+
"source": {
6+
"organizeImports": "on"
7+
}
8+
}
9+
},
10+
"vcs": {
11+
"enabled": true,
12+
"clientKind": "git",
13+
"useIgnoreFile": true
14+
},
15+
"formatter": {
16+
"indentStyle": "space"
17+
},
18+
"javascript": {
19+
"formatter": {
20+
"quoteStyle": "single"
21+
}
22+
},
23+
"css": {
24+
"parser": {
25+
"cssModules": true
26+
}
27+
},
28+
"linter": {
29+
"enabled": true,
30+
"rules": {
31+
"recommended": true
32+
}
33+
}
34+
}

package.json

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,23 @@
33
"version": "1.0.9",
44
"repository": "https://github.com/dmltdev/mongo-error-codes",
55
"description": "A minimal library of MongoDB error codes, names, and helper utilities for error handling, logging, and developer tools.",
6-
"main": "dist/index.js",
7-
"types": "dist/index.d.ts",
6+
"exports": {
7+
".": {
8+
"types": "./dist/index.d.ts",
9+
"import": "./dist/index.js"
10+
}
11+
},
12+
"types": "./dist/index.d.ts",
13+
"files": [
14+
"dist"
15+
],
816
"scripts": {
9-
"build": "tsc",
10-
"dev": "tsc -w",
11-
"test": "vitest",
17+
"build": "rslib build",
18+
"build:size": "pnpm build && echo \"Raw: $(du -h dist/index.mjs | cut -f1)\" && echo \"Gzipped: $(gzip -c dist/index.mjs | wc -c | numfmt --to=iec)\"",
19+
"check": "biome check --write",
20+
"dev": "rslib build --watch",
21+
"format": "biome format --write",
22+
"test": "vitest run",
1223
"coverage": "vitest run --coverage",
1324
"prepublishOnly": "npm run build"
1425
},
@@ -23,6 +34,9 @@
2334
"author": "dmltdev <dmltdev@proton.me>",
2435
"license": "MIT",
2536
"devDependencies": {
37+
"@biomejs/biome": "2.2.6",
38+
"@rslib/core": "0.17.0",
39+
"@types/node": "22.18.12",
2640
"@vitest/browser": "4.0.6",
2741
"@vitest/coverage-v8": "4.0.6",
2842
"typescript": "5.9.3",

0 commit comments

Comments
 (0)