From dfb64a7b52413896efa61bed4eff116ddf41e15a Mon Sep 17 00:00:00 2001 From: Betim Beja <11160171+BetimBeja@users.noreply.github.com> Date: Tue, 30 Apr 2024 12:15:24 +0200 Subject: [PATCH] feat: added copy css task to run --- run.js | 4 +++- tscfy.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/run.js b/run.js index fa0b3bf..a2fb1d5 100644 --- a/run.js +++ b/run.js @@ -12,8 +12,10 @@ function handleExit(code, stderr, errorCallback) { } async function run({ watch, dir, silent, command, errorCallback }) { - return new Promise((resolve, reject) => { + return new Promise(async (resolve, reject) => { if (command !== '') { + if (dir) await execa.command('npx copyfiles -u 1 src/**/*.css ' + dir); + const child = execa.command(command, { ... { buffer: false, diff --git a/tscfy.js b/tscfy.js index d6d0a74..0a89f33 100644 --- a/tscfy.js +++ b/tscfy.js @@ -39,7 +39,7 @@ async function tscfy(options = {}) { await run({ watch, command, silent, errorCallback }); } - await execa.command('npx copyfiles -u 1 src/**/*.d.ts lib/ts4.2') + await execa.command('npx copyfiles -u 1 src/**/*.d.ts lib/ts4.2'); if (!watch) { await execa.command('npx downlevel-dts lib/ts4.2 lib/ts3.9 --to=3.9');