esbuild-c
v0.1.34
Published
Empowers esbuild with config processing
Downloads
698
Readme
esbuild-c
Empowers esbuild with config processing
Motivation
- Align supported CLI options with the JS API. For example, to bring specifying plugins via the CLI.
- Let configs be mergeable via
extends
. - Load configs in any suitable formats.
Status
PoC
Install
npm i -D esbuild-c esbuild
Usage
CLI
esbuild-c [standard esbuild options]
esbuild-c --config esbuild.config.js
If --config
ref is not specified, esbuild-c
will look for it via cosmiconfig.
JS/TS
You can rebuild the CLI with your own logic:
#!/usr/bin/env node
import esbuild from 'esbuild'
import { loadConfig, parseArgv } from 'esbuild-c'
const flags = parseArgv(process.argv.slice(2))
const config = await loadConfig()
// do smth with the config
await esbuild.build(config)
Refs
- esbuild/issues/884
- esbuild-config
npm
- esbuild-resolve-config
npm
- FlavioLionelRita/config-extends
- cosmiconfig/issues/40
- chrisblossom/ex-config
- prettier/issues/3146