mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2024-12-23 00:36:28 +00:00
cli packaging
This commit is contained in:
parent
1abb78190a
commit
bc156f504f
15
packages/cli/build.js
Normal file
15
packages/cli/build.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { exec } from 'pkg'
|
||||||
|
|
||||||
|
const targets = [
|
||||||
|
'node18-macos-arm64',
|
||||||
|
'node18-macos-x64',
|
||||||
|
'node18-linux-arm64',
|
||||||
|
'node18-linux-x64',
|
||||||
|
'node18-win-arm64',
|
||||||
|
'node18-win-x64',
|
||||||
|
]
|
||||||
|
|
||||||
|
for (const target of targets) {
|
||||||
|
console.log(`🚀 Building ${target}`)
|
||||||
|
await exec(['./dist/index.cjs', '--target', target, '--output', `./bin/${target.replace('node18', 'cryptgeon')}`])
|
||||||
|
}
|
@ -1,11 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "@cryptgeon/cli",
|
"version": "2.3.0-beta.2",
|
||||||
|
"name": "cryptgeon",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "esbuild ./src/index.ts --bundle --platform=node --outfile=dist/index.cjs --watch",
|
"dev": "esbuild ./src/index.ts --bundle --platform=node --outfile=dist/index.cjs --watch",
|
||||||
"build": "esbuild ./src/index.ts --bundle --platform=node --outfile=dist/index.cjs",
|
"build": "rm -rf ./dist && tsc && esbuild ./src/index.ts --bundle --platform=node --outfile=dist/index.cjs",
|
||||||
"package": "pkg .",
|
"package": "node ./build.js",
|
||||||
"bin": "run-s build package"
|
"bin": "run-s build package",
|
||||||
|
"prepublishOnly": "run-s build"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"cryptgeon": "./dist/index.cjs"
|
"cryptgeon": "./dist/index.cjs"
|
||||||
@ -13,33 +18,19 @@
|
|||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"pkg": {
|
|
||||||
"scripts": [],
|
|
||||||
"targets": [
|
|
||||||
"node18-macos-arm64",
|
|
||||||
"node18-macos-x64",
|
|
||||||
"node18-linux-arm64",
|
|
||||||
"node18-linux-x64",
|
|
||||||
"node18-win-arm64",
|
|
||||||
"node18-win-x64"
|
|
||||||
],
|
|
||||||
"outputPath": "bin"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@commander-js/extra-typings": "^9.5.0",
|
||||||
|
"@cryptgeon/shared": "workspace:*",
|
||||||
"@types/inquirer": "^9.0.3",
|
"@types/inquirer": "^9.0.3",
|
||||||
"@types/mime": "^3.0.1",
|
"@types/mime": "^3.0.1",
|
||||||
"@types/node": "^18.16.1",
|
"@types/node": "^18.16.1",
|
||||||
"esbuild": "^0.17.18",
|
|
||||||
"pkg": "^5.8.1",
|
|
||||||
"typescript": "^4.9.5"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@commander-js/extra-typings": "^9.5.0",
|
|
||||||
"@cryptgeon/shared": "workspace:*",
|
|
||||||
"commander": "^9.5.0",
|
"commander": "^9.5.0",
|
||||||
|
"esbuild": "^0.17.18",
|
||||||
"inquirer": "^9.2.0",
|
"inquirer": "^9.2.0",
|
||||||
"mime": "^3.0.0",
|
"mime": "^3.0.0",
|
||||||
"occulto": "^2.0.1",
|
"occulto": "^2.0.1",
|
||||||
"pretty-bytes": "^6.1.0"
|
"pkg": "^5.8.1",
|
||||||
|
"pretty-bytes": "^6.1.0",
|
||||||
|
"typescript": "^4.9.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user