@taujs/create-taujs 0.1.2 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -238,19 +238,13 @@ function generatePackageJson(projectName, packageManager) {
238
238
  }
239
239
  function generateBuildTs() {
240
240
  return `import path from "node:path";
241
- import { fileURLToPath } from "node:url";
242
-
243
241
  import { taujsBuild } from "@taujs/server";
244
-
245
- import config from "./taujs.config.ts";
246
-
247
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
242
+ import config from "./taujs.config.js";
248
243
 
249
244
  await taujsBuild({
250
- clientBaseDir: path.resolve(__dirname, "src/client"),
245
+ clientBaseDir: path.resolve(process.cwd(), "src/client"),
251
246
  config,
252
- projectRoot: __dirname,
253
- mode: process.env.BUILD_MODE === 'ssr' ? 'ssr' : 'client',
247
+ projectRoot: process.cwd(),
254
248
  });
255
249
  `;
256
250
  }
@@ -806,11 +800,12 @@ function generateServerIndex() {
806
800
  import config from '../../taujs.config.ts';
807
801
  import { serviceRegistry } from './services/registry.ts';
808
802
 
803
+ const isDev = process.env.NODE_ENV !== "production";
804
+
809
805
  const { app, net } = await createServer({
810
806
  config,
811
807
  serviceRegistry,
812
- clientRoot: './src/client',
813
- debug: !!process.env.DEBUG,
808
+ debug: isDev ? { ssr: true } : false,
814
809
  });
815
810
 
816
811
  if (app) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taujs/create-taujs",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Scaffold a new τjs application",
5
5
  "author": "Aoede <taujs@aoede.uk.net> (https://www.aoede.uk.net)",
6
6
  "homepage": "https://taujs.dev/",