-
-
Notifications
You must be signed in to change notification settings - Fork 694
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
222 additions
and
60 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 |
---|---|---|
|
@@ -8,4 +8,5 @@ dist.new | |
.cache | ||
.turbo | ||
.rollup.cache | ||
dist-dts | ||
dist-dcts | ||
dist-dmts |
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
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,26 @@ | ||
import json from '@rollup/plugin-json'; | ||
import { defineConfig } from 'rollup'; | ||
import dts from 'rollup-plugin-dts'; | ||
import { entries, external } from './rollup.common'; | ||
|
||
export default defineConfig([ | ||
{ | ||
input: entries.reduce<Record<string, string>>((acc, entry) => { | ||
const from = 'dist-dmts/' + entry + '.d.ts'; | ||
const to = entry; | ||
acc[to] = from; | ||
return acc; | ||
}, {}), | ||
output: { | ||
dir: 'dist.new', | ||
entryFileNames: '[name].d.mts', | ||
}, | ||
external, | ||
plugins: [ | ||
json({ | ||
preferConst: true, | ||
}), | ||
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
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,26 @@ | ||
import terser from '@rollup/plugin-terser'; | ||
import typescript from '@rollup/plugin-typescript'; | ||
import { defineConfig } from 'rollup'; | ||
|
||
export default defineConfig([ | ||
{ | ||
input: 'src/index.ts', | ||
output: { | ||
format: 'cjs', | ||
dir: 'dist.new', | ||
entryFileNames: '[name].cjs', | ||
chunkFileNames: '[name]-[hash].cjs', | ||
sourcemap: true, | ||
}, | ||
external: [ | ||
/^drizzle-orm\/?/, | ||
'zod', | ||
], | ||
plugins: [ | ||
typescript({ | ||
tsconfig: 'tsconfig.cjs.json', | ||
}), | ||
terser(), | ||
], | ||
}, | ||
]); |
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
import { defineConfig } from 'rollup'; | ||
import dts from 'rollup-plugin-dts'; | ||
|
||
export default defineConfig([ | ||
{ | ||
input: 'src/index.ts', | ||
output: { | ||
dir: 'dist.new', | ||
entryFileNames: '[name].d.cts', | ||
}, | ||
external: [ | ||
/^drizzle-orm\/?/, | ||
'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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { defineConfig } from 'rollup'; | ||
import dts from 'rollup-plugin-dts'; | ||
|
||
export default defineConfig([ | ||
{ | ||
input: 'src/index.ts', | ||
output: { | ||
dir: 'dist.new', | ||
entryFileNames: '[name].d.mts', | ||
}, | ||
external: [ | ||
/^drizzle-orm\/?/, | ||
'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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import terser from '@rollup/plugin-terser'; | ||
import typescript from '@rollup/plugin-typescript'; | ||
import { defineConfig } from 'rollup'; | ||
|
||
export default defineConfig([ | ||
{ | ||
input: 'src/index.ts', | ||
output: { | ||
format: 'esm', | ||
dir: 'dist.new', | ||
entryFileNames: '[name].mjs', | ||
chunkFileNames: '[name]-[hash].mjs', | ||
sourcemap: true, | ||
}, | ||
external: [ | ||
/^drizzle-orm\/?/, | ||
'zod', | ||
], | ||
plugins: [ | ||
typescript({ | ||
tsconfig: 'tsconfig.esm.json', | ||
}), | ||
terser(), | ||
], | ||
}, | ||
]); |
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 @@ | ||
#!/usr/bin/env -S pnpm tsx | ||
import 'zx/globals'; | ||
import concurrently from 'concurrently'; | ||
|
||
await concurrently([ | ||
{ | ||
command: 'rollup --config rollup.cjs.config.ts --configPlugin typescript', | ||
name: 'cjs', | ||
}, | ||
{ | ||
command: 'rollup --config rollup.esm.config.ts --configPlugin typescript', | ||
name: 'esm', | ||
}, | ||
{ | ||
command: `tsc -p tsconfig.cjs.json --declaration --outDir dist-dcts --emitDeclarationOnly && resolve-tspaths --out dist-dcts && rollup --config rollup.dcts.config.ts --configPlugin typescript`, | ||
name: 'dcts', | ||
}, | ||
{ | ||
command: `tsc -p tsconfig.esm.json --declaration --outDir dist-dmts --emitDeclarationOnly && resolve-tspaths --out dist-dmts && rollup --config rollup.dmts.config.ts --configPlugin typescript`, | ||
name: 'dmts', | ||
}, | ||
], { | ||
killOthers: 'failure', | ||
}).result.catch(() => process.exit(1)); | ||
fs.copySync('../README.md', 'dist.new/README.md'); | ||
fs.removeSync('dist'); | ||
fs.renameSync('dist.new', 'dist'); |
File renamed without changes.
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,8 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "src", | ||
"incremental": true | ||
}, | ||
"include": ["src"] | ||
} |
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.