mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2024-11-01 04:44:16 +01:00
add build cli
This commit is contained in:
parent
145f9ef18f
commit
3ea176cc1f
14
packages/cli/build.js
Normal file
14
packages/cli/build.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import pkg from './package.json' assert { type: 'json' }
|
||||||
|
import { build } from 'tsup'
|
||||||
|
|
||||||
|
const watch = process.argv.slice(2)[0] === '--watch'
|
||||||
|
|
||||||
|
await build({
|
||||||
|
entry: ['src/index.ts', 'src/cli.ts'],
|
||||||
|
dts: true,
|
||||||
|
minify: true,
|
||||||
|
format: ['esm', 'cjs'],
|
||||||
|
clean: true,
|
||||||
|
define: { VERSION: `"${pkg.version}"` },
|
||||||
|
watch,
|
||||||
|
})
|
@ -20,7 +20,8 @@
|
|||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bin": "run-s build package",
|
"bin": "run-s build package",
|
||||||
"build": "rm -rf dist && tsc && tsup ./src/index.ts ./src/cli.ts --dts --format esm,cjs --minify",
|
"build": "tsc && node build.js",
|
||||||
|
"dev": "node build.js --watch",
|
||||||
"prepublishOnly": "run-s build"
|
"prepublishOnly": "run-s build"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
Loading…
Reference in New Issue
Block a user