mirror of
https://github.com/pockethost/pockethost.git
synced 2025-03-30 15:08:30 +00:00
chore(root): drop buildtool
This commit is contained in:
parent
184b883c94
commit
34acdf1e2c
3
.gitignore
vendored
3
.gitignore
vendored
@ -13,4 +13,5 @@ pocketbase
|
||||
live-data
|
||||
dist
|
||||
.pockethost
|
||||
|
||||
.scripts
|
||||
*.tgz
|
@ -1,56 +0,0 @@
|
||||
import { Command, program } from 'commander'
|
||||
import { BuildOptions, build, context } from 'esbuild'
|
||||
import { nodeExternalsPlugin } from 'esbuild-node-externals'
|
||||
import ncp from 'ncp'
|
||||
|
||||
export const main = async () => {
|
||||
program.name('buildtool').description('CLI build and watch ')
|
||||
|
||||
const args: BuildOptions = {
|
||||
entryPoints: ['src/cli/index.ts'],
|
||||
bundle: true,
|
||||
format: 'esm',
|
||||
platform: 'node',
|
||||
outfile: 'dist/index.mjs',
|
||||
plugins: [nodeExternalsPlugin()],
|
||||
}
|
||||
|
||||
program.addCommand(
|
||||
new Command(`build`).description(`Build CLI`).action(async () => {
|
||||
console.log(`Building CLI`)
|
||||
await build(args)
|
||||
|
||||
console.log(`Building mothership app`)
|
||||
await new Promise<void>((resolve) => {
|
||||
ncp(`src/mothership-app`, './dist/mothership-app', (e) => {
|
||||
if (e) {
|
||||
console.error(e)
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
|
||||
console.log(`Building instance app`)
|
||||
await new Promise<void>((resolve) => {
|
||||
ncp(`src/instance-app`, './dist/instance-app', (e) => {
|
||||
if (e) {
|
||||
console.error(e)
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
program.addCommand(
|
||||
new Command(`watch`).description(`Watch CLI`).action(async () => {
|
||||
console.log(`Watching`)
|
||||
const ctx = await context(args)
|
||||
await ctx.watch()
|
||||
}),
|
||||
)
|
||||
|
||||
await program.parseAsync()
|
||||
}
|
||||
|
||||
main()
|
@ -17,7 +17,6 @@
|
||||
"lint": "prettier -c \"./**/*.{ts,js,cjs,svelte,json}\"",
|
||||
"lint:fix": "prettier -w \"./**/*.{ts,js,cjs,svelte,json}\"",
|
||||
"build": "concurrently 'pnpm:build:*'",
|
||||
"buildtool": "tsx buildtool/index.ts",
|
||||
"build-frontends": "concurrently 'pnpm:build:frontend:*'",
|
||||
"build:frontend:dashboard": "cd frontends/dashboard && pnpm build",
|
||||
"build:docker": "cd pockethost-instance && docker build . -t benallfree/pockethost-instance:${npm_package_version} -t benallfree/pockethost-instance:latest",
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user