From b1cd7a5835700764eb7802e59ad5e0deab4f73ff Mon Sep 17 00:00:00 2001 From: Aviv Ben Shahar Date: Thu, 15 Aug 2024 09:54:18 +0300 Subject: [PATCH] chore: code review - small fixes --- docs/app/setup/bundler-options.md | 4 ++-- src/bundler/constants/bundler-options-defaults.config.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/app/setup/bundler-options.md b/docs/app/setup/bundler-options.md index b5e489b..3279424 100644 --- a/docs/app/setup/bundler-options.md +++ b/docs/app/setup/bundler-options.md @@ -59,8 +59,8 @@ module.exports = { ## `rootAssets` -By default, `fast-alfred` would bundle the a few files from the root of the project, like the `package.json` and the `README.md`. -you can add more assets to be bundled by adding paths into the `rootAssets` property. +By default, `fast-alfred` would bundle a few files from the root of the project, like the `package.json` and the `README.md`. +You can add more assets to be bundled at the root, instead of the `assets` directory, by adding paths to the `rootAssets` property. ##### Example diff --git a/src/bundler/constants/bundler-options-defaults.config.ts b/src/bundler/constants/bundler-options-defaults.config.ts index 4dc1e64..9212025 100644 --- a/src/bundler/constants/bundler-options-defaults.config.ts +++ b/src/bundler/constants/bundler-options-defaults.config.ts @@ -55,4 +55,4 @@ globalThis.__dirname = _private_path.dirname(__filename); ` as const export const PACK_ENTITIES = (targetDir: string, rootAssets: string[]) => - ['*.png ', '*.plist', 'README.md', `${targetDir}/**`, 'package.json', `"${rootAssets}"`] as const + ['*.png ', '*.plist', 'README.md', `${targetDir}/**`, 'package.json'].concat(rootAssets.map((a) => `"${a}"`))