@fluffjs/cli 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cli.js +9 -2
- package/Generator.js +1 -0
- package/interfaces/FluffTarget.d.ts +1 -0
- package/package.json +1 -1
package/Cli.js
CHANGED
|
@@ -328,6 +328,9 @@ Examples:
|
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
console.log(' Building with esbuild...');
|
|
331
|
+
const tsconfigRaw = target.tsConfigPath
|
|
332
|
+
? fs.readFileSync(path.resolve(projectRoot, target.tsConfigPath), 'utf-8')
|
|
333
|
+
: '{}';
|
|
331
334
|
const result = await esbuild.build({
|
|
332
335
|
entryPoints: [entryPoint],
|
|
333
336
|
bundle: true,
|
|
@@ -350,7 +353,7 @@ Examples:
|
|
|
350
353
|
],
|
|
351
354
|
external: bundleOptions.external ?? [],
|
|
352
355
|
logLevel: 'warning',
|
|
353
|
-
tsconfigRaw
|
|
356
|
+
tsconfigRaw
|
|
354
357
|
});
|
|
355
358
|
const outputs = Object.keys(result.metafile?.outputs ?? {});
|
|
356
359
|
const jsBundle = outputs.find(f => f.endsWith('.js'));
|
|
@@ -560,6 +563,9 @@ Examples:
|
|
|
560
563
|
}
|
|
561
564
|
}
|
|
562
565
|
console.log(`🚀 Starting dev server for '${target.name}'...`);
|
|
566
|
+
const tsconfigRaw = target.tsConfigPath
|
|
567
|
+
? fs.readFileSync(path.resolve(projectRoot, target.tsConfigPath), 'utf-8')
|
|
568
|
+
: '{}';
|
|
563
569
|
const ctx = await esbuild.context({
|
|
564
570
|
entryPoints: [entryPoint],
|
|
565
571
|
bundle: true,
|
|
@@ -580,7 +586,8 @@ Examples:
|
|
|
580
586
|
production: false
|
|
581
587
|
})
|
|
582
588
|
],
|
|
583
|
-
logLevel: 'info'
|
|
589
|
+
logLevel: 'info',
|
|
590
|
+
tsconfigRaw
|
|
584
591
|
});
|
|
585
592
|
await ctx.watch();
|
|
586
593
|
console.log(' Watching for changes...');
|
package/Generator.js
CHANGED