Skip to content

Commit 62984bb

Browse files
authored
feat: add build process via rollup (#21)
1 parent 06496e8 commit 62984bb

File tree

6 files changed

+379
-21
lines changed

6 files changed

+379
-21
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,10 @@ jobs:
3939

4040
- name: 💪 Type check
4141
run: pnpm -r test:typecheck
42+
43+
- name: 📦 Build
44+
run: pnpm -r build
45+
46+
# - name: 🚢 Continuous Release
47+
# run: pnpm dlx pkg-pr-new publish './packages/core'
48+
# if: github.event_name == 'pull_request'

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"url": "git+https://github.com/tsky-dev/tsky.git"
1111
},
1212
"scripts": {
13+
"build": "pnpm run --filter tsky build",
1314
"docs:dev": "pnpm run --filter tsky-docs dev",
1415
"docs:build": "pnpm run --filter tsky-docs build",
1516
"docs:preview": "pnpm run --filter tsky-docs preview",

packages/core/package.json

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,40 @@
1-
{
2-
"name": "tsky",
3-
"version": "0.1.0",
4-
"license": "MIT",
5-
"scripts": {
6-
"lint": "eslint ./src",
7-
"lint:fix": "eslint ./src --fix",
8-
"test": "echo \"Error: no test specified\"",
9-
"test:typescript": "tsc --noEmit"
10-
},
11-
"devDependencies": {
12-
"@atproto/api": "^0.13.18",
13-
"globals": "^15.12.0",
14-
"tsx": "^4.19.2",
15-
"typescript": "^5.7.2"
16-
}
17-
}
1+
{
2+
"name": "tsky",
3+
"type": "module",
4+
"version": "0.1.0-alpha.0",
5+
"license": "MIT",
6+
"exports": {
7+
".": {
8+
"import": {
9+
"types": "./dist/index.d.ts",
10+
"default": "./dist/index.js"
11+
},
12+
"require": {
13+
"types": "./dist/index.d.cts",
14+
"default": "./dist/index.cjs"
15+
}
16+
}
17+
},
18+
"main": "dist/index.cjs",
19+
"module": "dist/index.js",
20+
"types": "dist/index.d.ts",
21+
"files": [
22+
"dist"
23+
],
24+
"scripts": {
25+
"build": "pkgroll",
26+
"lint": "eslint ./src",
27+
"lint:fix": "eslint ./src --fix",
28+
"test": "echo \"Error: no test specified\"",
29+
"test:typescript": "tsc --noEmit"
30+
},
31+
"dependencies": {
32+
"@atproto/api": "^0.13.18"
33+
},
34+
"devDependencies": {
35+
"globals": "^15.12.0",
36+
"pkgroll": "^2.5.1",
37+
"tsx": "^4.19.2",
38+
"typescript": "^5.7.2"
39+
}
40+
}

packages/core/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
export * from './bsky';
22
export * from './tsky';
3-
4-
export { TSky as default } from './tsky';

packages/core/tsconfig.json

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,31 @@
11
{
22
"compilerOptions": {
3+
"target": "ES2018",
4+
"lib": ["ESNext"],
5+
"useDefineForClassFields": false,
6+
"experimentalDecorators": true,
37
"baseUrl": ".",
8+
"module": "ESNext",
9+
"moduleResolution": "node",
410
"paths": {
511
"~/*": ["src/*"]
6-
}
12+
},
13+
"strict": true,
14+
"noFallthroughCasesInSwitch": true,
15+
"noImplicitOverride": true,
16+
"noImplicitReturns": true,
17+
"declaration": false,
18+
"noEmit": true,
19+
"esModuleInterop": true,
20+
"forceConsistentCasingInFileNames": true,
21+
"skipLibCheck": true
22+
},
23+
"include": ["./src/**/*", "./tests/**/*", "./test-utils/**/*"],
24+
"typedocOptions": {
25+
"out": "./docs",
26+
"theme": "default",
27+
"exclude": "**/+(__tests__|__mocks__)/*",
28+
"excludePrivate": true,
29+
"excludeProtected": true
730
}
831
}

0 commit comments

Comments
 (0)