Skip to content

Commit 02a224f

Browse files
committed
Move path config back to main file
1 parent 1441fc2 commit 02a224f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

bin/build/index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const tasks = new Listr(
4444
{
4545
title: 'Fetching icons',
4646
task: async (ctx) => {
47-
ctx.tasks = { global: { rootDir, defaultVariant }, icons: {} };
47+
ctx.tasks = { global: { defaultVariant }, icons: {} };
4848

4949
const iconsVariantsDirs = Object.fromEntries(
5050
iconsVariants.map((variant) => [
@@ -84,7 +84,14 @@ const tasks = new Listr(
8484
Object.entries(targets).map(([targetName, targetConfig]) => ({
8585
title: targetConfig.title,
8686
enabled: () => ctx.cliTargets.length === 0 || ctx.cliTargets.includes(targetName),
87-
task: async (ctx) => ctx.pool.run({ targetName, config: ctx.tasks, targetConfig }),
87+
task: (ctx) => {
88+
targetConfig.path = path.join(
89+
rootDir,
90+
...targetConfig.path.split(path.posix.sep),
91+
);
92+
93+
return ctx.pool.run({ targetName, config: ctx.tasks, targetConfig });
94+
},
8895
})),
8996
{ concurrent: true, exitOnError: false },
9097
),

bin/build/worker.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
import path from 'node:path';
2-
31
export default async ({ targetName, config, targetConfig }) => {
42
const { default: task } = await import(
53
`./targets/${targetConfig.target || targetName}/index.js`
64
);
75

8-
targetConfig.path = path.join(
9-
config.global.rootDir,
10-
...targetConfig.path.split(path.posix.sep),
11-
);
12-
136
return task(config, targetConfig);
147
};

0 commit comments

Comments
 (0)