From 4f8ac2d54861929677c1e12c2932f0d6d59331f3 Mon Sep 17 00:00:00 2001 From: Gbacc Date: Thu, 27 Jun 2024 09:43:24 +0200 Subject: [PATCH] fix(TMC-28977): Allow Talend script to build .css files (#5361) Co-authored-by: Geoffroy Baccarini --- .changeset/honest-clouds-think.md | 5 +++++ tools/scripts-core/src/scripts/build-lib.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/honest-clouds-think.md diff --git a/.changeset/honest-clouds-think.md b/.changeset/honest-clouds-think.md new file mode 100644 index 0000000000..44afbef240 --- /dev/null +++ b/.changeset/honest-clouds-think.md @@ -0,0 +1,5 @@ +--- +"@talend/scripts-core": patch +--- + +TMC-28977 - Allow Talend scripts to copy .css files on build diff --git a/tools/scripts-core/src/scripts/build-lib.js b/tools/scripts-core/src/scripts/build-lib.js index 4bb518e654..282bb271b7 100755 --- a/tools/scripts-core/src/scripts/build-lib.js +++ b/tools/scripts-core/src/scripts/build-lib.js @@ -152,7 +152,7 @@ export default async function build(env, presetApi, unsafeOptions) { const copyPromise = () => new Promise((resolve, reject) => { if (options.includes('--watch')) { - const evtEmitter = cpx.watch(`${srcFolder}/**/*.{scss,json}`, targetFolder); + const evtEmitter = cpx.watch(`${srcFolder}/**/*.{css,scss,json}`, targetFolder); evtEmitter.on('watch-error', err => { reject(err); }); @@ -161,7 +161,7 @@ export default async function build(env, presetApi, unsafeOptions) { }); } else { console.log('Copying assets...'); - cpx.copy(`${srcFolder}/**/*.{scss,json}`, targetFolder, err => { + cpx.copy(`${srcFolder}/**/*.{css,scss,json}`, targetFolder, err => { if (err) { console.error(err); reject(err);