|
Asper Header
1.0.14
The header injector extension
|
Custom build script for VSCode extension packaging. More...
Go to the source code of this file.
Functions | |
| function | walk (dir, suffix) |
| function | patternExists (from) |
| function | checkedCopy (options) |
| function | minifyJSON (src, dest) |
| function async | main () |
Variables | |
| import fs from | fs |
| import path from | path |
| import esbuild from | esbuild |
| import { copy } from "esbuild-plugin-copy" | |
| const | logLevel = 'info' |
| const | production = process.argv.includes('--production') |
| const | watch = process.argv.includes('--watch') |
| const | esbuildProblemMatcherPlugin |
Custom build script for VSCode extension packaging.
Handles TypeScript bundling, JSON minification, asset copying with guard checks, and problem matcher integration for developer feedback.
Definition in file esbuild.js.
| function checkedCopy | ( | options | ) |
Wrapper around esbuild-plugin-copy that ensures each "from" pattern resolves to at least one file before proceeding.
| {Parameters<typeof | copy>[0]} options - Copy plugin options. |
| {Error} | If any "from" pattern resolves to no files. |
Definition at line 107 of file esbuild.js.
| function async main | ( | ) |
Main build entry point.
Definition at line 171 of file esbuild.js.
| function minifyJSON | ( | src, | |
| dest ) |
Minify JSON by reading a source file, parsing, and re-stringifying.
| {string} | src - Path to source JSON file. |
| {string} | dest - Destination path for minified JSON. |
Definition at line 127 of file esbuild.js.
| function patternExists | ( | from | ) |
Minimal glob-like existence check using Node built-ins. Does not attempt to fully emulate globbing libraries.
| {string | | string[]} from - Path or glob-like pattern(s) to check. Supports:
|
| {Error} | If a base directory in a pattern does not exist. |
<recursive> is represented by ** in the pattern. Definition at line 52 of file esbuild.js.
| function walk | ( | dir, | |
| suffix ) |
Recursively walks through a directory tree and checks if any file matches the expected suffix (after glob simplification).
| {string} | dir - Directory to traverse recursively. |
| {string} | suffix - File suffix to match (e.g., ".txt", ".min.json"). |
Definition at line 24 of file esbuild.js.
| import esbuild from esbuild |
Definition at line 11 of file esbuild.js.
| const esbuildProblemMatcherPlugin |
Problem matcher plugin for esbuild. Helps VSCode surface build errors in Problems panel.
Definition at line 144 of file esbuild.js.
| import fs from fs |
Definition at line 9 of file esbuild.js.
| import { copy } from "esbuild-plugin-copy" |
Definition at line 12 of file esbuild.js.
| const logLevel = 'info' |
Definition at line 14 of file esbuild.js.
| import path from path |
Definition at line 10 of file esbuild.js.
| const production = process.argv.includes('--production') |
Definition at line 118 of file esbuild.js.
| const watch = process.argv.includes('--watch') |
Definition at line 119 of file esbuild.js.