@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 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
@@ -128,6 +128,7 @@ export class Generator {
128
128
  srcDir: 'src',
129
129
  outDir: 'dist',
130
130
  componentsDir: 'app',
131
+ tsConfigPath: 'tsconfig.json',
131
132
  entryPoint: 'main.ts',
132
133
  indexHtml: 'index.html',
133
134
  components: ['**/*.component.ts'],
@@ -5,6 +5,7 @@ export interface FluffTarget {
5
5
  srcDir: string;
6
6
  outDir: string;
7
7
  componentsDir?: string;
8
+ tsConfigPath?: string;
8
9
  entryPoint?: string;
9
10
  indexHtml?: string;
10
11
  components: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluffjs/cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",