Skip to content

Commit

Permalink
speechbubbles: log sticker path
Browse files Browse the repository at this point in the history
  • Loading branch information
nzbr committed Jan 4, 2024
1 parent 9562708 commit d4a68bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/html-postprocessors/speechbubbles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import { toPosixPath } from '@nzbr/parcel-transformer-postprocess-html';

export const name = 'speechbubbles';

export function fn({ $, asset, options, config }: StepInputs): void {
export function fn({ $, asset, options, config, logger }: StepInputs): void {
const projectRoot = toPosixPath(options.projectRoot);
const possibleCopperflameRoot = path.posix.join(projectRoot, 'node_modules', '@nzbr', 'copperflame');
const root = fs.existsSync(possibleCopperflameRoot) ? possibleCopperflameRoot : projectRoot;
const stickers = config.stickerPath ?? path.posix.join(root, 'assets', 'stickers');

logger.info({message: `Using stickers from ${stickers}`});

asset.invalidateOnFileCreate({
glob: path.posix.join(stickers, '*'),
});
Expand Down

0 comments on commit d4a68bb

Please sign in to comment.