@constela/start 1.2.12 → 1.2.13

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.
@@ -2811,6 +2811,9 @@ async function resolveConfig(fileConfig, cliOptions) {
2811
2811
  }
2812
2812
  const result = { ...fileConfig };
2813
2813
  if (cliOptions.css !== void 0) result.css = cliOptions.css;
2814
+ if (cliOptions.cssContent !== void 0) {
2815
+ result.cssContent = cliOptions.cssContent.split(",").map((s) => s.trim()).filter(Boolean);
2816
+ }
2814
2817
  if (cliOptions.layoutsDir !== void 0) result.layoutsDir = cliOptions.layoutsDir;
2815
2818
  if (cliOptions.routesDir !== void 0) result.routesDir = cliOptions.routesDir;
2816
2819
  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-O7RPEMZJ.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-O7RPEMZJ.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.13",
4
4
  "description": "Meta-framework for Constela applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -45,8 +45,8 @@
45
45
  "tailwindcss": "^4.0.0",
46
46
  "@constela/compiler": "0.7.0",
47
47
  "@constela/core": "0.7.0",
48
- "@constela/runtime": "0.10.1",
49
48
  "@constela/router": "8.0.0",
49
+ "@constela/runtime": "0.10.1",
50
50
  "@constela/server": "3.0.1"
51
51
  },
52
52
  "devDependencies": {