@hobenakicoffee/libraries 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +3 -4
- package/README.md +42 -16
- package/package.json +1 -1
|
@@ -2,14 +2,15 @@ name: Publish to npm
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
|
|
6
|
-
-
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
7
|
|
|
8
8
|
jobs:
|
|
9
9
|
publish:
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
permissions:
|
|
12
12
|
contents: read
|
|
13
|
+
id-token: write
|
|
13
14
|
steps:
|
|
14
15
|
- name: Checkout
|
|
15
16
|
uses: actions/checkout@v4
|
|
@@ -36,5 +37,3 @@ jobs:
|
|
|
36
37
|
|
|
37
38
|
- name: Publish
|
|
38
39
|
run: npm publish --access public
|
|
39
|
-
env:
|
|
40
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/README.md
CHANGED
|
@@ -1,14 +1,36 @@
|
|
|
1
1
|
# @hobenakicoffee/libraries
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Framework-agnostic shared libraries for “হবে নাকি Coffee?” projects.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
Install the package from npm:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @hobenakicoffee/libraries
|
|
11
|
+
# or
|
|
12
|
+
pnpm add @hobenakicoffee/libraries
|
|
13
|
+
# or
|
|
14
|
+
yarn add @hobenakicoffee/libraries
|
|
15
|
+
# or
|
|
16
|
+
bun add @hobenakicoffee/libraries
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Use it in your app:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { SOME_CONSTANT } from "@hobenakicoffee/libraries";
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Local development
|
|
26
|
+
|
|
27
|
+
Install dependencies:
|
|
6
28
|
|
|
7
29
|
```bash
|
|
8
30
|
bun install
|
|
9
31
|
```
|
|
10
32
|
|
|
11
|
-
|
|
33
|
+
Common tasks:
|
|
12
34
|
|
|
13
35
|
```bash
|
|
14
36
|
# Run in watch mode during development
|
|
@@ -24,7 +46,7 @@ bun run test
|
|
|
24
46
|
bun run test:watch
|
|
25
47
|
```
|
|
26
48
|
|
|
27
|
-
|
|
49
|
+
Build artifacts:
|
|
28
50
|
|
|
29
51
|
```bash
|
|
30
52
|
# Build the library
|
|
@@ -34,15 +56,7 @@ bun run build
|
|
|
34
56
|
bun run clean
|
|
35
57
|
```
|
|
36
58
|
|
|
37
|
-
##
|
|
38
|
-
|
|
39
|
-
The library will automatically build before publishing:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npm publish
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Project Structure
|
|
59
|
+
## Project structure
|
|
46
60
|
|
|
47
61
|
```
|
|
48
62
|
src/
|
|
@@ -51,8 +65,20 @@ src/
|
|
|
51
65
|
index.ts
|
|
52
66
|
```
|
|
53
67
|
|
|
54
|
-
|
|
68
|
+
## Release & publish
|
|
69
|
+
|
|
70
|
+
Publishing is automated on push to the `main` branch via GitHub Actions. Ensure:
|
|
71
|
+
|
|
72
|
+
- `package.json` version is updated.
|
|
73
|
+
- `NPM_TOKEN` secret is set in the repo with publish permissions.
|
|
74
|
+
|
|
75
|
+
For local publish (if needed):
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm publish --access public
|
|
79
|
+
```
|
|
55
80
|
|
|
56
|
-
##
|
|
81
|
+
## Notes
|
|
57
82
|
|
|
58
|
-
|
|
83
|
+
- This project uses Bun for development and builds.
|
|
84
|
+
- To generate supabase types, follow https://supabase.com/docs/guides/api/rest/generating-types
|