From eb23b2ceea580837d130db1e99c62384c408f422 Mon Sep 17 00:00:00 2001 From: Sam Chung Date: Thu, 31 Oct 2024 13:59:59 +1100 Subject: [PATCH] Document Hidden Feature (#1723) Co-authored-by: skuba <34733141+seek-oss-ci@users.noreply.github.com> Co-authored-by: Ryan Ling --- docs/cli/build.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/cli/build.md b/docs/cli/build.md index 02e12ce4d..658b3b9bb 100644 --- a/docs/cli/build.md +++ b/docs/cli/build.md @@ -62,6 +62,24 @@ With esbuild, you can supply the following options: | `--debug` | Enable debug console output | | `--project` | Point to a different `tsconfig.json` file | +## Bundling assets + +To bundle additional assets alongside your build, add an `assets` field inside the `skuba` section within your `package.json`. + +```json +{ + "skuba": { + "entryPoint": "src/index.ts", + "template": "koa-rest-api", + "type": "application", + "version": "8.1.0", + "assets": ["**/*.vocab/*translations.json"] + } +} +``` + +In this example, all `*.vocab/*translations.json` files found within `src` will be copied into the corresponding `lib` directory. + --- ## skuba build-package @@ -86,6 +104,10 @@ On a resource-constrained Buildkite agent, you can limit this with the `--serial` flag. See our [Buildkite guide] for more information. +To bundle additional assets alongside your package, view the [bundling assets](#bundling-assets) section above. + +These files will be copied into the corresponding `lib-commonjs` and `lib-es2015` directories. + | Option | Description | | :--------- | :----------------------------------------------- | | `--serial` | Force serial execution of compilation operations |