Library setup.
This commit is contained in:
commit
214cb7f1c1
5 changed files with 105 additions and 0 deletions
17
.gitignore
vendored
Normal file
17
.gitignore
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
# IDEA
|
||||
|
||||
.idea/
|
||||
*.iml
|
||||
|
||||
# JS library
|
||||
|
||||
coverage/
|
||||
lib/
|
||||
.parcel-cache/
|
||||
.yarn/
|
||||
.yarnrc*
|
||||
yarn-error.log
|
||||
.pnp*
|
||||
node_modules/
|
||||
|
||||
yarn.lock
|
11
README.md
Normal file
11
README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
<h1 align="center">
|
||||
Sharkitek Drizzle
|
||||
</h1>
|
||||
|
||||
<h4 align="center">
|
||||
<a href="https://code.zeptotech.net/Sharkitek/Drizzle">Documentation</a>
|
||||
</h4>
|
||||
|
||||
<p align="center">
|
||||
Drizzle connector for Sharkitek models
|
||||
</p>
|
10
jest.config.js
Normal file
10
jest.config.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
||||
|
||||
export default {
|
||||
preset: "ts-jest",
|
||||
testEnvironment: "node",
|
||||
|
||||
roots: [
|
||||
"./tests",
|
||||
],
|
||||
};
|
40
package.json
Normal file
40
package.json
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "@sharkitek/drizzle",
|
||||
"version": "1.0.0",
|
||||
"description": "Drizzle connector for Sharkitek models.",
|
||||
"repository": "https://code.zeptotech.net/Sharkitek/Drizzle",
|
||||
"author": {
|
||||
"name": "Madeorsk",
|
||||
"email": "madeorsk@protonmail.com"
|
||||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc && vite build",
|
||||
"test": "jest"
|
||||
},
|
||||
"type": "module",
|
||||
"source": "src/index.ts",
|
||||
"types": "lib/index.d.ts",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
"lib/**/*"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.13",
|
||||
"@types/node": "^22.7.4",
|
||||
"drizzle-orm": "^0.33.0",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.2.5",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.6.2",
|
||||
"vite": "^5.4.8",
|
||||
"vite-plugin-dts": "^4.2.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"drizzle-orm": "^0.33.0"
|
||||
},
|
||||
"packageManager": "yarn@4.5.0"
|
||||
}
|
27
vite.config.ts
Normal file
27
vite.config.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
import {ConfigEnv, defineConfig, UserConfig} from "vite";
|
||||
import dts from "vite-plugin-dts";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
|
||||
export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
||||
return ({
|
||||
build: {
|
||||
outDir: "lib",
|
||||
sourcemap: true,
|
||||
minify: "esbuild",
|
||||
lib: {
|
||||
entry: "src/index.ts",
|
||||
formats: ["es"],
|
||||
fileName: "index",
|
||||
},
|
||||
},
|
||||
|
||||
plugins: [
|
||||
dts({
|
||||
insertTypesEntry: true,
|
||||
rollupTypes: true,
|
||||
exclude: ["node_modules"],
|
||||
}),
|
||||
]
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue