@constela/start 1.2.12 → 1.2.14

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.
@@ -2098,6 +2098,13 @@ async function createDevServer(options = {}) {
2098
2098
  layoutParams,
2099
2099
  slots
2100
2100
  );
2101
+ const layoutImportData = layoutProgram.importData;
2102
+ if (layoutImportData) {
2103
+ composedProgram.importData = {
2104
+ ...composedProgram.importData ?? {},
2105
+ ...layoutImportData
2106
+ };
2107
+ }
2101
2108
  }
2102
2109
  }
2103
2110
  }
@@ -2811,6 +2818,9 @@ async function resolveConfig(fileConfig, cliOptions) {
2811
2818
  }
2812
2819
  const result = { ...fileConfig };
2813
2820
  if (cliOptions.css !== void 0) result.css = cliOptions.css;
2821
+ if (cliOptions.cssContent !== void 0) {
2822
+ result.cssContent = cliOptions.cssContent.split(",").map((s) => s.trim()).filter(Boolean);
2823
+ }
2814
2824
  if (cliOptions.layoutsDir !== void 0) result.layoutsDir = cliOptions.layoutsDir;
2815
2825
  if (cliOptions.routesDir !== void 0) result.routesDir = cliOptions.routesDir;
2816
2826
  if (cliOptions.publicDir !== void 0) result.publicDir = cliOptions.publicDir;
@@ -11,6 +11,7 @@ type DevHandler = (options: {
11
11
  type BuildHandler = (options: {
12
12
  outDir?: string | undefined;
13
13
  css?: string | undefined;
14
+ cssContent?: string[] | undefined;
14
15
  layoutsDir?: string | undefined;
15
16
  }) => Promise<void>;
16
17
  type StartHandler = (options: {
package/dist/cli/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  createDevServer,
4
4
  loadConfig,
5
5
  resolveConfig
6
- } from "../chunk-323JPB5R.js";
6
+ } from "../chunk-7KQYNZ2A.js";
7
7
  import "../chunk-PUTC5BCP.js";
8
8
 
9
9
  // src/cli/index.ts
@@ -31,7 +31,8 @@ var buildHandler = async (options) => {
31
31
  await build({
32
32
  outDir: options.outDir,
33
33
  layoutsDir: options.layoutsDir,
34
- css: options.css
34
+ css: options.css,
35
+ cssContent: options.cssContent
35
36
  });
36
37
  console.log("Build complete");
37
38
  };
@@ -68,11 +69,12 @@ function createCLI() {
68
69
  program.command("dev").description("Start development server").option("-p, --port <port>", "Port number", "3000").option("-h, --host <host>", "Host address").option("-c, --css <path>", "CSS entry point for Vite processing").option("-l, --layoutsDir <path>", "Layouts directory for layout composition").action(async (options) => {
69
70
  await devHandler(options);
70
71
  });
71
- program.command("build").description("Build for production").option("-o, --outDir <outDir>", "Output directory").option("-c, --css <path>", "CSS entry point for Vite processing").option("-l, --layoutsDir <path>", "Layouts directory for layout composition").action(async (options) => {
72
+ program.command("build").description("Build for production").option("-o, --outDir <outDir>", "Output directory").option("-c, --css <path>", "CSS entry point for Vite processing").option("--cssContent <paths>", "Content paths for Tailwind CSS class scanning (comma-separated)").option("-l, --layoutsDir <path>", "Layouts directory for layout composition").action(async (options) => {
72
73
  const fileConfig = await loadConfig(process.cwd());
73
74
  const resolved = await resolveConfig(fileConfig, {
74
75
  outDir: options.outDir,
75
76
  css: options.css,
77
+ cssContent: options.cssContent,
76
78
  layoutsDir: options.layoutsDir
77
79
  });
78
80
  const mergedOptions = {};
@@ -80,6 +82,8 @@ function createCLI() {
80
82
  if (outDirValue !== void 0) mergedOptions.outDir = outDirValue;
81
83
  const cssValue = options.css ?? (typeof resolved.css === "string" ? resolved.css : resolved.css?.[0]);
82
84
  if (cssValue !== void 0) mergedOptions.css = cssValue;
85
+ const cssContentValue = resolved.cssContent;
86
+ if (cssContentValue !== void 0) mergedOptions.cssContent = cssContentValue;
83
87
  const layoutsDirValue = options.layoutsDir ?? resolved.layoutsDir;
84
88
  if (layoutsDirValue !== void 0) mergedOptions.layoutsDir = layoutsDirValue;
85
89
  await buildHandler(mergedOptions);
package/dist/index.d.ts CHANGED
@@ -526,6 +526,7 @@ declare class DataLoader {
526
526
 
527
527
  interface ConstelaConfigFile {
528
528
  css?: string | string[];
529
+ cssContent?: string[];
529
530
  layoutsDir?: string;
530
531
  routesDir?: string;
531
532
  publicDir?: string;
@@ -539,6 +540,7 @@ interface ConstelaConfigFile {
539
540
  }
540
541
  interface CLIOptions {
541
542
  css?: string | undefined;
543
+ cssContent?: string | undefined;
542
544
  layoutsDir?: string | undefined;
543
545
  routesDir?: string | undefined;
544
546
  publicDir?: string | undefined;
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  transformCsv,
24
24
  transformMdx,
25
25
  transformYaml
26
- } from "./chunk-323JPB5R.js";
26
+ } from "./chunk-7KQYNZ2A.js";
27
27
  import {
28
28
  generateHydrationScript,
29
29
  renderPage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constela/start",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "description": "Meta-framework for Constela applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",