chore(root): drop buildtool

This commit is contained in:
Ben Allfree 2024-06-01 09:59:22 -04:00
parent 184b883c94
commit 34acdf1e2c
4 changed files with 2 additions and 58 deletions

3
.gitignore vendored
View File

@ -13,4 +13,5 @@ pocketbase
live-data
dist
.pockethost
.scripts
*.tgz

View File

@ -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()

View File

@ -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.