badlib 0.0.1
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 +42 -0
- package/README.md +15 -0
- package/package.json +23 -0
- package/src/functions/cn.ts +6 -0
- package/src/functions/getObjectKeys.ts +1 -0
- package/src/functions/index.ts +1 -0
- package/src/index.ts +1 -0
- package/tsconfig.json +39 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- uses: oven-sh/setup-bun@v1
|
|
22
|
+
|
|
23
|
+
- run: bun install --frozen-lockfile
|
|
24
|
+
|
|
25
|
+
- name: Bump version (patch)
|
|
26
|
+
run: |
|
|
27
|
+
npm version patch -m "chore(release): v%s"
|
|
28
|
+
|
|
29
|
+
- name: Build
|
|
30
|
+
run: bun run build
|
|
31
|
+
|
|
32
|
+
- name: Configure npm auth
|
|
33
|
+
run: |
|
|
34
|
+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
35
|
+
env:
|
|
36
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
37
|
+
|
|
38
|
+
- name: Publish
|
|
39
|
+
run: npm publish --access public
|
|
40
|
+
|
|
41
|
+
- name: Push version bump
|
|
42
|
+
run: git push --follow-tags
|
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "badlib",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@types/bun": "latest"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"typescript": "^5"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"clsx": "^2.1.1",
|
|
21
|
+
"tailwind-merge": "^3.4.0"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getObjectKeys = <T extends {}>(obj: T) => Object.keys(obj) as (keyof T)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '.';
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as functions from './functions';
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Language & runtime */
|
|
4
|
+
"target": "ES2019",
|
|
5
|
+
"lib": [
|
|
6
|
+
"ES2019",
|
|
7
|
+
"DOM"
|
|
8
|
+
],
|
|
9
|
+
"jsx": "react-jsx",
|
|
10
|
+
/* Module system */
|
|
11
|
+
"module": "ESNext",
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"moduleDetection": "force",
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
/* Output */
|
|
16
|
+
"rootDir": "src",
|
|
17
|
+
"outDir": "dist",
|
|
18
|
+
"declaration": true,
|
|
19
|
+
"declarationMap": true,
|
|
20
|
+
"sourceMap": true,
|
|
21
|
+
"emitDeclarationOnly": false,
|
|
22
|
+
"noEmit": false,
|
|
23
|
+
/* Interop & compatibility */
|
|
24
|
+
"esModuleInterop": true,
|
|
25
|
+
"forceConsistentCasingInFileNames": true,
|
|
26
|
+
/* Type safety */
|
|
27
|
+
"strict": true,
|
|
28
|
+
"noUncheckedIndexedAccess": true,
|
|
29
|
+
"noImplicitOverride": true,
|
|
30
|
+
"noFallthroughCasesInSwitch": true,
|
|
31
|
+
/* Performance / DX */
|
|
32
|
+
"skipLibCheck": true,
|
|
33
|
+
/* Pathing */
|
|
34
|
+
"baseUrl": "./src"
|
|
35
|
+
},
|
|
36
|
+
"include": [
|
|
37
|
+
"src"
|
|
38
|
+
],
|
|
39
|
+
}
|