Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ and I recommend reading
[Tailwind CSS](https://tailwindcss.com/)
- Working IDE go-to-definition and go-to-type-definition using `.d.ts.map` files
- ESM everything
- Path aliases
- Typescript path aliases (that get resolved in build output)
- Shared configurations for ESLint v9 with strict type-aware rules
- Simple standard configuration for TypeScript
- Shared standardized configuration for TypeScript
- Vitest
- Clean, typed Firestore abstractions using
[@typed-firestore/react](https://github.com/0x80/typed-firestore) and
Expand Down
10 changes: 6 additions & 4 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
"description": "Common code for both backend and frontend",
"version": "0.0.0",
"type": "module",
"types": "./dist/index.d.ts",
"exports": {
".": "./dist/index.js"
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"check-types": "tsc --noEmit",
"test": "vitest",
"build": "tsup && tsc --emitDeclarationOnly",
"build": "bunchee --sourcemap --target es2022",
"clean": "del-cli dist tsconfig.tsbuildinfo",
"lint": "eslint src --flag unstable_config_lookup_from_file --max-warnings 0",
"coverage": "vitest run --coverage"
Expand All @@ -27,10 +29,10 @@
"@codecompose/typescript-config": "^1.2.0",
"@eslint/js": "^9.19.0",
"@repo/eslint-config": "workspace:*",
"bunchee": "^6.6.0",
"del-cli": "^6.0.0",
"eslint": "^9.19.0",
"prettier": "^3.4.2",
"tsup": "^8.3.6",
"typescript": "^5.7.3",
"typescript-eslint": "^8.21.0",
"vitest": "^3.0.4"
Expand Down
16 changes: 0 additions & 16 deletions packages/common/tsup.config.ts

This file was deleted.

26 changes: 16 additions & 10 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@
"files": [
"dist"
],
"types": "./dist/index.d.ts",
"exports": {
"./db-refs": "./dist/db-refs.js",
"./utils": "./dist/utils/index.js",
"./firebase": "./dist/firebase.js"
},
"scripts": {
"check-types": "tsc --noEmit",
"lint": "eslint src --flag unstable_config_lookup_from_file --max-warnings 0 ",
"test": "vitest",
"build": "tsup && tsc --emitDeclarationOnly && tsc-alias --verbose",
"build": "bunchee --sourcemap --runtime node --target es2022",
"clean": "del-cli dist tsconfig.tsbuildinfo",
"coverage": "vitest run --coverage "
},
Expand All @@ -33,13 +27,25 @@
"@eslint/js": "^9.19.0",
"@repo/eslint-config": "workspace:*",
"@types/node": "^22.10.10",
"bunchee": "^6.6.0",
"del-cli": "^6.0.0",
"eslint": "^9.19.0",
"npm-run-all": "^4.1.5",
"tsc-alias": "^1.8.10",
"tsup": "^8.3.6",
"typescript": "^5.7.3",
"typescript-eslint": "^8.21.0",
"vitest": "^3.0.4"
},
"exports": {
"./db-refs": {
"types": "./dist/db-refs.d.ts",
"default": "./dist/db-refs.js"
},
"./firebase": {
"types": "./dist/firebase.d.ts",
"default": "./dist/firebase.js"
},
"./utils": {
"types": "./dist/utils.d.ts",
"default": "./dist/utils.js"
}
}
}
9 changes: 8 additions & 1 deletion packages/core/src/db-refs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import type { Counter } from "@repo/common";
import type { CollectionReference } from "firebase-admin/firestore";
import { db } from "./firebase";
/**
* Here we are using a path alias ~/ to be able to reference the src directory
* from anywhere. This is configured out-of-the box via
* codecompose/typescript-config. This is the responsibility of the bundler
* (Bunchee), because the Typescript compiler does not do this for us. Not all
* bundlers have this feature.
*/
import { db } from "~/firebase";

/**
* Here we defined reusable references to collections and type each of them so
Expand Down
25 changes: 0 additions & 25 deletions packages/core/tsup.config.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"license": "MIT",
"devDependencies": {
"@eslint/js": "^9.19.0",
"bunchee": "^6.6.0",
"typescript-eslint": "^8.21.0"
}
}
Loading