-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1669 from nellh/deno-cli-bundle
Bundle CLI entrypoint with main() call
- Loading branch information
Showing
4 changed files
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/bids-validator.ts' | ||
|
||
await main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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', | ||
|
@@ -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, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { main } from './main.ts' | ||
|
||
await main() |