Skip to content

Commit

Permalink
feat(schema): Move the CLI entrypoint into src for bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
nellh committed May 3, 2023
1 parent 042d943 commit 6534c4b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions bids-validator/bids-validator-deno
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/env -S deno run --allow-read --allow-write --allow-env --allow-net --allow-run
import { main } from './src/main.ts'
import './src/run.ts'

await main()
3 changes: 2 additions & 1 deletion bids-validator/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import * as esbuild from 'https://deno.land/x/[email protected]/mod.js'
import { parse } from 'https://deno.land/[email protected]/flags/mod.ts'

const MAIN_ENTRY = 'src/main.ts'
const CLI_ENTRY = 'src/bids-validator.ts'

const httpPlugin = {
name: 'http',
Expand Down Expand Up @@ -43,7 +44,7 @@ const flags = parse(Deno.args, {

const result = await esbuild.build({
format: 'esm',
entryPoints: [MAIN_ENTRY],
entryPoints: [MAIN_ENTRY, CLI_ENTRY],
bundle: true,
outdir: 'dist/validator',
minify: flags.minify,
Expand Down
3 changes: 3 additions & 0 deletions bids-validator/src/bids-validator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { main } from './main.ts'

await main()

0 comments on commit 6534c4b

Please sign in to comment.