-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more docs, better readme, also build
- Loading branch information
Showing
11 changed files
with
229 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Publish Package to npmjs | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: oven-sh/setup-bun@v1 | ||
|
||
# do we really need this one? | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
|
||
- run: bun install | ||
|
||
- run: bun run build | ||
|
||
- uses: JS-DevTools/npm-publish@v3 | ||
id: publish | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,3 +178,6 @@ dist | |
.env.test | ||
.env.prod | ||
.env.dev | ||
|
||
# build | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// eslint-disable-next-line node/no-unpublished-import | ||
import dts from "bun-plugin-dts"; | ||
|
||
await Bun.build({ | ||
entrypoints: ["./src/index.ts"], | ||
outdir: "./build", | ||
target: "node", | ||
external: ["axios", "zod"], | ||
plugins: [dts()], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,22 @@ | |
"contributors": [ | ||
"Erhan Tezcan <[email protected]> (https://github.com/erhant)" | ||
], | ||
"files": [ | ||
"build/", | ||
"LICENSE", | ||
"README.md" | ||
], | ||
"scripts": { | ||
"cli": "bun run ./src/bin/index.ts", | ||
"build": "bun run ./build.ts", | ||
"b": "bun run build", | ||
"check": "tsc --noEmit && echo \"All good.\"", | ||
"format": "prettier --check '**/*.ts'", | ||
"lint": "eslint '**/*.ts' && echo 'All good.'", | ||
"t": "bun test", | ||
"proto:code:insert": "npx pbjs ./proto/insert.proto -w commonjs -t static-module -o ./proto/insert.js", | ||
"proto:type:insert": "npx pbts ./proto/insert.js -o ./proto/insert.d.ts" | ||
"test": "bun test --timeout 15000", | ||
"t": "bun run test", | ||
"proto:code": "npx pbjs ./proto/insert.proto -w commonjs -t static-module -o ./proto/insert.js", | ||
"proto:type": "npx pbts ./proto/insert.js -o ./proto/insert.d.ts", | ||
"proto": "bun proto:code && bun proto:type" | ||
}, | ||
"type": "module", | ||
"module": "index.ts", | ||
|
@@ -24,6 +32,7 @@ | |
"devDependencies": { | ||
"@types/bun": "^1.0.4", | ||
"@typescript-eslint/eslint-plugin": "^6.20.0", | ||
"bun-plugin-dts": "^0.2.1", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export { Dria } from "./dria"; | ||
import Dria from "./dria"; | ||
export default Dria; | ||
|
||
export type { DriaParams } from "./types"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.