@analogjs/platform 3.0.0-alpha.12 → 3.0.0-alpha.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.
Files changed (46) hide show
  1. package/package.json +9 -7
  2. package/src/index.d.ts +2 -1
  3. package/src/index.js +2 -1
  4. package/src/index.js.map +1 -1
  5. package/src/lib/content/shiki/shiki-highlighter.d.ts +2 -2
  6. package/src/lib/content/shiki/shiki-highlighter.js +2 -2
  7. package/src/lib/content/shiki/shiki-highlighter.js.map +1 -1
  8. package/src/lib/json-ld-manifest-plugin.d.ts +41 -0
  9. package/src/lib/json-ld-manifest-plugin.js +84 -0
  10. package/src/lib/json-ld-manifest-plugin.js.map +1 -0
  11. package/src/lib/nx-plugin/src/generators/app/files/template-angular/vite.config.ts__template__ +6 -0
  12. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v17/vite.config.ts__template__ +0 -1
  13. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v18/vite.config.ts__template__ +0 -1
  14. package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/vite.config.ts__template__ +0 -1
  15. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.js +0 -2
  16. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.js.map +1 -1
  17. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.d.ts +0 -2
  18. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.js +1 -26
  19. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.js.map +1 -1
  20. package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.d.ts +7 -9
  21. package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.js +2 -4
  22. package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.js.map +1 -1
  23. package/src/lib/nx-plugin/src/generators/app/versions/tailwind-dependencies.d.ts +1 -1
  24. package/src/lib/nx-plugin/src/generators/app/versions/tailwind-dependencies.js +1 -2
  25. package/src/lib/nx-plugin/src/generators/app/versions/tailwind-dependencies.js.map +1 -1
  26. package/src/lib/nx-plugin/src/generators/preset/__snapshots__/generator.spec.ts.snap +3 -1
  27. package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.d.ts +5 -5
  28. package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.js +5 -5
  29. package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.js.map +1 -1
  30. package/src/lib/options.d.ts +78 -4
  31. package/src/lib/platform-plugin.js +10 -2
  32. package/src/lib/platform-plugin.js.map +1 -1
  33. package/src/lib/route-file-discovery.d.ts +23 -0
  34. package/src/lib/route-file-discovery.js +114 -0
  35. package/src/lib/route-file-discovery.js.map +1 -0
  36. package/src/lib/route-generation-plugin.d.ts +3 -0
  37. package/src/lib/route-generation-plugin.js +34 -0
  38. package/src/lib/route-generation-plugin.js.map +1 -0
  39. package/src/lib/route-manifest.d.ts +104 -0
  40. package/src/lib/route-manifest.js +363 -0
  41. package/src/lib/route-manifest.js.map +1 -0
  42. package/src/lib/typed-routes-plugin.d.ts +50 -0
  43. package/src/lib/typed-routes-plugin.js +204 -0
  44. package/src/lib/typed-routes-plugin.js.map +1 -0
  45. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v4/.postcssrc.json +0 -5
  46. package/src/lib/nx-plugin/src/generators/app/files/tailwind/v4/tailwind.config.ts__template__ +0 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@analogjs/platform",
3
- "version": "3.0.0-alpha.12",
3
+ "version": "3.0.0-alpha.14",
4
4
  "description": "The fullstack meta-framework for Angular",
5
5
  "type": "module",
6
6
  "author": "Brandon Roberts <robertsbt@gmail.com>",
@@ -28,23 +28,25 @@
28
28
  "url": "https://github.com/sponsors/brandonroberts"
29
29
  },
30
30
  "dependencies": {
31
+ "front-matter": "^4.0.2",
32
+ "tinyglobby": "^0.2.15",
31
33
  "nitro": "3.0.260311-beta",
32
- "@analogjs/vite-plugin-angular": "^3.0.0-alpha.12",
33
- "@analogjs/vite-plugin-nitro": "^3.0.0-alpha.12",
34
- "rolldown": "^1.0.0-rc.9",
34
+ "@analogjs/vite-plugin-angular": "^3.0.0-alpha.14",
35
+ "@analogjs/vite-plugin-nitro": "^3.0.0-alpha.14",
36
+ "rolldown": "^1.0.0-rc.11",
35
37
  "vitefu": "^1.1.2"
36
38
  },
37
39
  "peerDependencies": {
38
40
  "@nx/angular": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0 || ^22",
39
41
  "@nx/devkit": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0 || ^22",
40
42
  "@nx/vite": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0 || ^22",
41
- "marked": "^15.0.12",
43
+ "marked": "^17.0.5",
42
44
  "marked-gfm-heading-id": "^4.1.3",
43
45
  "marked-highlight": "^2.2.3",
44
46
  "marked-mangle": "^1.1.12",
45
47
  "marked-shiki": "^1.2.1",
46
- "shiki": "^1.29.2",
47
- "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
48
+ "shiki": "^1.29.2 || ^4.0.2",
49
+ "vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
48
50
  },
49
51
  "peerDependenciesMeta": {
50
52
  "@nx/angular": {
package/src/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import { platformPlugin } from "./lib/platform-plugin.js";
2
- export type { Options, PrerenderContentFile } from "./lib/options";
2
+ export type { Options, PrerenderSitemapConfig, TypedRouterOptions, PrerenderContentFile, SitemapConfig, SitemapEntry, SitemapExcludeRule, SitemapPriority, SitemapRouteDefinition, SitemapRouteInput, SitemapRouteSource, SitemapTransform } from "./lib/options.js";
3
+ export { routeGenerationPlugin } from "./lib/route-generation-plugin.js";
3
4
  export default platformPlugin;
package/src/index.js CHANGED
@@ -1,7 +1,8 @@
1
+ import { routeGenerationPlugin } from "./lib/route-generation-plugin.js";
1
2
  import { platformPlugin } from "./lib/platform-plugin.js";
2
3
  //#region packages/platform/src/index.ts
3
4
  var src_default = platformPlugin;
4
5
  //#endregion
5
- export { src_default as default };
6
+ export { src_default as default, routeGenerationPlugin };
6
7
 
7
8
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../packages/platform/src/index.ts"],"sourcesContent":["import { platformPlugin } from './lib/platform-plugin.js';\n\nexport type { Options, PrerenderContentFile } from './lib/options';\nexport default platformPlugin;\n"],"mappings":";;AAGA,IAAA,cAAe"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../packages/platform/src/index.ts"],"sourcesContent":["import { platformPlugin } from './lib/platform-plugin.js';\n\nexport type {\n Options,\n PrerenderSitemapConfig,\n TypedRouterOptions,\n PrerenderContentFile,\n SitemapConfig,\n SitemapEntry,\n SitemapExcludeRule,\n SitemapPriority,\n SitemapRouteDefinition,\n SitemapRouteInput,\n SitemapRouteSource,\n SitemapTransform,\n} from './lib/options.js';\nexport { routeGenerationPlugin } from './lib/route-generation-plugin.js';\nexport default platformPlugin;\n"],"mappings":";;;AAiBA,IAAA,cAAe"}
@@ -1,6 +1,6 @@
1
- import { type BundledLanguage, type BundledTheme, type CodeOptionsMeta, type CodeOptionsMultipleThemes, type CodeOptionsSingleTheme, type CodeToHastOptionsCommon, getHighlighter } from "shiki";
1
+ import { type BundledLanguage, type BundledTheme, type CodeOptionsMeta, type CodeOptionsMultipleThemes, type CodeOptionsSingleTheme, type CodeToHastOptionsCommon, createHighlighter } from "shiki";
2
2
  import { MarkedContentHighlighter } from "../marked/marked-content-highlighter.js";
3
- export type ShikiHighlighterOptions = Parameters<typeof getHighlighter>[0];
3
+ export type ShikiHighlighterOptions = Parameters<typeof createHighlighter>[0];
4
4
  export type ShikiHighlightOptions = Partial<Omit<CodeToHastOptionsCommon<BundledLanguage>, "lang">> & CodeOptionsMeta & Partial<CodeOptionsSingleTheme<BundledTheme>> & Partial<CodeOptionsMultipleThemes<BundledTheme>>;
5
5
  export declare const defaultHighlighterOptions: {
6
6
  langs: string[];
@@ -1,6 +1,6 @@
1
1
  import { MarkedContentHighlighter } from "../marked/marked-content-highlighter.js";
2
2
  import markedShiki from "marked-shiki";
3
- import { getHighlighter } from "shiki";
3
+ import { createHighlighter } from "shiki";
4
4
  //#region packages/platform/src/lib/content/shiki/shiki-highlighter.ts
5
5
  var defaultHighlighterOptions = {
6
6
  langs: [
@@ -23,7 +23,7 @@ var ShikiHighlighter = class extends MarkedContentHighlighter {
23
23
  this.highlightOptions = highlightOptions;
24
24
  this.container = container;
25
25
  this.hasLoadMermaid = hasLoadMermaid;
26
- this.highlighter = getHighlighter(this.highlighterOptions);
26
+ this.highlighter = createHighlighter(this.highlighterOptions);
27
27
  }
28
28
  getHighlightExtension() {
29
29
  return markedShiki({
@@ -1 +1 @@
1
- {"version":3,"file":"shiki-highlighter.js","names":[],"sources":["../../../../../../../packages/platform/src/lib/content/shiki/shiki-highlighter.ts"],"sourcesContent":["import markedShiki from 'marked-shiki';\nimport {\n type BundledLanguage,\n type BundledTheme,\n type CodeOptionsMeta,\n type CodeOptionsMultipleThemes,\n type CodeOptionsSingleTheme,\n type CodeToHastOptionsCommon,\n getHighlighter,\n} from 'shiki';\n\nimport { MarkedContentHighlighter } from '../marked/marked-content-highlighter.js';\n\nexport type ShikiHighlighterOptions = Parameters<typeof getHighlighter>[0];\nexport type ShikiHighlightOptions = Partial<\n Omit<CodeToHastOptionsCommon<BundledLanguage>, 'lang'>\n> &\n CodeOptionsMeta &\n Partial<CodeOptionsSingleTheme<BundledTheme>> &\n Partial<CodeOptionsMultipleThemes<BundledTheme>>;\n\nexport const defaultHighlighterOptions: {\n langs: string[];\n themes: string[];\n} = {\n langs: [\n 'json',\n 'ts',\n 'tsx',\n 'js',\n 'jsx',\n 'html',\n 'css',\n 'angular-html',\n 'angular-ts',\n ],\n themes: ['github-dark', 'github-light'],\n};\n\nexport class ShikiHighlighter extends MarkedContentHighlighter {\n private readonly highlighter: ReturnType<typeof getHighlighter>;\n\n constructor(\n private highlighterOptions: ShikiHighlighterOptions,\n private highlightOptions: ShikiHighlightOptions,\n private container: string,\n private hasLoadMermaid = false,\n ) {\n super();\n this.highlighter = getHighlighter(this.highlighterOptions);\n }\n getHighlightExtension(): import('marked').MarkedExtension {\n return markedShiki({\n container: this.container,\n highlight: async (code, lang, props) => {\n if (this.hasLoadMermaid && lang === 'mermaid') {\n return `<pre class=\"mermaid\">${code}</pre>`;\n }\n\n const { codeToHtml } = await this.highlighter;\n return codeToHtml(\n code,\n Object.assign(\n {\n lang,\n // required by `transformerMeta*`\n meta: { __raw: props.join(' ') },\n theme: 'github-dark',\n },\n this.highlightOptions,\n ),\n );\n },\n });\n }\n}\n"],"mappings":";;;;AAqBA,IAAa,4BAGT;CACF,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,QAAQ,CAAC,eAAe,eAAe;CACxC;AAED,IAAa,mBAAb,cAAsC,yBAAyB;CAG7D,YACE,oBACA,kBACA,WACA,iBAAyB,OACzB;AACA,SAAO;AALC,OAAA,qBAAA;AACA,OAAA,mBAAA;AACA,OAAA,YAAA;AACA,OAAA,iBAAA;AAGR,OAAK,cAAc,eAAe,KAAK,mBAAmB;;CAE5D,wBAA0D;AACxD,SAAO,YAAY;GACjB,WAAW,KAAK;GAChB,WAAW,OAAO,MAAM,MAAM,UAAU;AACtC,QAAI,KAAK,kBAAkB,SAAS,UAClC,QAAO,wBAAwB,KAAK;IAGtC,MAAM,EAAE,eAAe,MAAM,KAAK;AAClC,WAAO,WACL,MACA,OAAO,OACL;KACE;KAEA,MAAM,EAAE,OAAO,MAAM,KAAK,IAAI,EAAE;KAChC,OAAO;KACR,EACD,KAAK,iBACN,CACF;;GAEJ,CAAC"}
1
+ {"version":3,"file":"shiki-highlighter.js","names":[],"sources":["../../../../../../../packages/platform/src/lib/content/shiki/shiki-highlighter.ts"],"sourcesContent":["import markedShiki from 'marked-shiki';\nimport {\n type BundledLanguage,\n type BundledTheme,\n type CodeOptionsMeta,\n type CodeOptionsMultipleThemes,\n type CodeOptionsSingleTheme,\n type CodeToHastOptionsCommon,\n createHighlighter,\n} from 'shiki';\n\nimport { MarkedContentHighlighter } from '../marked/marked-content-highlighter.js';\n\nexport type ShikiHighlighterOptions = Parameters<typeof createHighlighter>[0];\nexport type ShikiHighlightOptions = Partial<\n Omit<CodeToHastOptionsCommon<BundledLanguage>, 'lang'>\n> &\n CodeOptionsMeta &\n Partial<CodeOptionsSingleTheme<BundledTheme>> &\n Partial<CodeOptionsMultipleThemes<BundledTheme>>;\n\nexport const defaultHighlighterOptions: {\n langs: string[];\n themes: string[];\n} = {\n langs: [\n 'json',\n 'ts',\n 'tsx',\n 'js',\n 'jsx',\n 'html',\n 'css',\n 'angular-html',\n 'angular-ts',\n ],\n themes: ['github-dark', 'github-light'],\n};\n\nexport class ShikiHighlighter extends MarkedContentHighlighter {\n private readonly highlighter: ReturnType<typeof createHighlighter>;\n\n constructor(\n private highlighterOptions: ShikiHighlighterOptions,\n private highlightOptions: ShikiHighlightOptions,\n private container: string,\n private hasLoadMermaid = false,\n ) {\n super();\n this.highlighter = createHighlighter(this.highlighterOptions);\n }\n getHighlightExtension(): import('marked').MarkedExtension {\n return markedShiki({\n container: this.container,\n highlight: async (code, lang, props) => {\n if (this.hasLoadMermaid && lang === 'mermaid') {\n return `<pre class=\"mermaid\">${code}</pre>`;\n }\n\n const { codeToHtml } = await this.highlighter;\n return codeToHtml(\n code,\n Object.assign(\n {\n lang,\n // required by `transformerMeta*`\n meta: { __raw: props.join(' ') },\n theme: 'github-dark',\n },\n this.highlightOptions,\n ),\n );\n },\n });\n }\n}\n"],"mappings":";;;;AAqBA,IAAa,4BAGT;CACF,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,QAAQ,CAAC,eAAe,eAAe;CACxC;AAED,IAAa,mBAAb,cAAsC,yBAAyB;CAG7D,YACE,oBACA,kBACA,WACA,iBAAyB,OACzB;AACA,SAAO;AALC,OAAA,qBAAA;AACA,OAAA,mBAAA;AACA,OAAA,YAAA;AACA,OAAA,iBAAA;AAGR,OAAK,cAAc,kBAAkB,KAAK,mBAAmB;;CAE/D,wBAA0D;AACxD,SAAO,YAAY;GACjB,WAAW,KAAK;GAChB,WAAW,OAAO,MAAM,MAAM,UAAU;AACtC,QAAI,KAAK,kBAAkB,SAAS,UAClC,QAAO,wBAAwB,KAAK;IAGtC,MAAM,EAAE,eAAe,MAAM,KAAK;AAClC,WAAO,WACL,MACA,OAAO,OACL;KACE;KAEA,MAAM,EAAE,OAAO,MAAM,KAAK,IAAI,EAAE;KAChC,OAAO;KACR,EACD,KAAK,iBACN,CACF;;GAEJ,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { type JsonLdObject } from "./route-manifest.js";
2
+ export type JsonLdModuleManifestEntry = {
3
+ kind: "module";
4
+ routePath: string;
5
+ sourceFile: string;
6
+ importAlias: string;
7
+ };
8
+ export type JsonLdContentManifestEntry = {
9
+ kind: "content";
10
+ routePath: string;
11
+ sourceFile: string;
12
+ jsonLd: JsonLdObject[];
13
+ };
14
+ export type JsonLdManifestEntry = JsonLdModuleManifestEntry | JsonLdContentManifestEntry;
15
+ /**
16
+ * Heuristic detector for JSON-LD exports in route modules.
17
+ *
18
+ * This is intentionally regex-based for speed during file scanning.
19
+ * It reliably detects these direct export patterns:
20
+ *
21
+ * - `export const routeJsonLd = ...`
22
+ * - `export const routeMeta = { ..., jsonLd: ... }`
23
+ * - `export const routeJsonLd = (route) => ...` (function form)
24
+ *
25
+ * Known limitations (not detected):
26
+ *
27
+ * - re-exports: `export { routeJsonLd } from './data'`
28
+ * - aliased exports: `export { something as routeJsonLd }`
29
+ * - default exports: `export default { jsonLd: ... }`
30
+ * - indirect assignment: `const data = { jsonLd: ... }; export const routeMeta = data`
31
+ *
32
+ * Known false-positive risks:
33
+ *
34
+ * - comment text containing `export const routeJsonLd`
35
+ * - unrelated `jsonLd` text appearing after `export const routeMeta`
36
+ *
37
+ * Prefer the supported direct export patterns listed above.
38
+ */
39
+ export declare function detectJsonLdModuleExports(fileContent: string): boolean;
40
+ export declare function extractMarkdownJsonLd(rawContent: string): JsonLdObject[];
41
+ export declare function generateJsonLdManifestSource(entries: JsonLdManifestEntry[], outFile: string): string;
@@ -0,0 +1,84 @@
1
+ import { normalizeJsonLd } from "./route-manifest.js";
2
+ import { normalizePath } from "vite";
3
+ import { dirname, relative } from "node:path";
4
+ import fm from "front-matter";
5
+ //#region packages/platform/src/lib/json-ld-manifest-plugin.ts
6
+ /**
7
+ * Heuristic detector for JSON-LD exports in route modules.
8
+ *
9
+ * This is intentionally regex-based for speed during file scanning.
10
+ * It reliably detects these direct export patterns:
11
+ *
12
+ * - `export const routeJsonLd = ...`
13
+ * - `export const routeMeta = { ..., jsonLd: ... }`
14
+ * - `export const routeJsonLd = (route) => ...` (function form)
15
+ *
16
+ * Known limitations (not detected):
17
+ *
18
+ * - re-exports: `export { routeJsonLd } from './data'`
19
+ * - aliased exports: `export { something as routeJsonLd }`
20
+ * - default exports: `export default { jsonLd: ... }`
21
+ * - indirect assignment: `const data = { jsonLd: ... }; export const routeMeta = data`
22
+ *
23
+ * Known false-positive risks:
24
+ *
25
+ * - comment text containing `export const routeJsonLd`
26
+ * - unrelated `jsonLd` text appearing after `export const routeMeta`
27
+ *
28
+ * Prefer the supported direct export patterns listed above.
29
+ */
30
+ function detectJsonLdModuleExports(fileContent) {
31
+ return /export\s+const\s+routeJsonLd\b/.test(fileContent) || /export\s+const\s+routeMeta\b[\s\S]*?\bjsonLd\b/.test(fileContent);
32
+ }
33
+ function extractMarkdownJsonLd(rawContent) {
34
+ const { attributes } = fm(rawContent);
35
+ return normalizeJsonLd(attributes["jsonLd"]);
36
+ }
37
+ function generateJsonLdManifestSource(entries, outFile) {
38
+ const lines = [];
39
+ const moduleEntries = entries.filter((entry) => entry.kind === "module");
40
+ lines.push("// This file is auto-generated by @analogjs/platform");
41
+ lines.push("// Do not edit manually");
42
+ lines.push("");
43
+ lines.push("import type { Graph, Thing, WithContext } from 'schema-dts';");
44
+ moduleEntries.forEach((entry) => {
45
+ lines.push(`import * as ${entry.importAlias} from '${toImportPath(outFile, entry.sourceFile)}';`);
46
+ });
47
+ lines.push("");
48
+ lines.push("export type AnalogJsonLdDocument = WithContext<Thing> | Graph | Array<WithContext<Thing>>;");
49
+ lines.push("export type GeneratedJsonLdManifestEntry = { routePath: string; sourceFile: string; kind: 'module' | 'content'; resolveJsonLd: () => AnalogJsonLdDocument[]; };");
50
+ lines.push("");
51
+ lines.push("function normalizeJsonLd(value: unknown): AnalogJsonLdDocument[] {");
52
+ lines.push(" if (Array.isArray(value)) {");
53
+ lines.push(" return value.filter((entry): entry is AnalogJsonLdDocument => typeof entry === 'object' && entry !== null && !Array.isArray(entry));");
54
+ lines.push(" }");
55
+ lines.push("");
56
+ lines.push(" return typeof value === 'object' && value !== null ? [value as AnalogJsonLdDocument] : [];");
57
+ lines.push("}");
58
+ lines.push("");
59
+ lines.push("function resolveModuleJsonLd(routeModule: unknown): AnalogJsonLdDocument[] {");
60
+ lines.push(" const typedRouteModule = routeModule as { routeJsonLd?: unknown; routeMeta?: { jsonLd?: unknown } };");
61
+ lines.push(" return normalizeJsonLd(typedRouteModule.routeMeta?.jsonLd ?? typedRouteModule.routeJsonLd);");
62
+ lines.push("}");
63
+ lines.push("");
64
+ lines.push("export const routeJsonLdManifest = new Map<string, GeneratedJsonLdManifestEntry>([");
65
+ entries.forEach((entry) => {
66
+ if (entry.kind === "module") {
67
+ lines.push(` ['${entry.routePath}', { routePath: '${entry.routePath}', sourceFile: '${entry.sourceFile}', kind: 'module', resolveJsonLd: () => resolveModuleJsonLd(${entry.importAlias}) }],`);
68
+ return;
69
+ }
70
+ lines.push(` ['${entry.routePath}', { routePath: '${entry.routePath}', sourceFile: '${entry.sourceFile}', kind: 'content', resolveJsonLd: () => ${JSON.stringify(entry.jsonLd)} }],`);
71
+ });
72
+ lines.push("]);");
73
+ lines.push("");
74
+ return lines.join("\n");
75
+ }
76
+ function toImportPath(outFile, sourceFile) {
77
+ const relativePath = normalizePath(relative(dirname(outFile), sourceFile.replace(/^\//, "").replace(/\.(ts|js|analog|ag)$/, "")));
78
+ if (relativePath.startsWith(".")) return relativePath;
79
+ return `./${relativePath}`;
80
+ }
81
+ //#endregion
82
+ export { detectJsonLdModuleExports, extractMarkdownJsonLd, generateJsonLdManifestSource };
83
+
84
+ //# sourceMappingURL=json-ld-manifest-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-ld-manifest-plugin.js","names":[],"sources":["../../../../../packages/platform/src/lib/json-ld-manifest-plugin.ts"],"sourcesContent":["import fm from 'front-matter';\nimport { normalizePath } from 'vite';\nimport { dirname, relative } from 'node:path';\n\nimport { normalizeJsonLd, type JsonLdObject } from './route-manifest.js';\n\nexport type JsonLdModuleManifestEntry = {\n kind: 'module';\n routePath: string;\n sourceFile: string;\n importAlias: string;\n};\n\nexport type JsonLdContentManifestEntry = {\n kind: 'content';\n routePath: string;\n sourceFile: string;\n jsonLd: JsonLdObject[];\n};\n\nexport type JsonLdManifestEntry =\n | JsonLdModuleManifestEntry\n | JsonLdContentManifestEntry;\n\n/**\n * Heuristic detector for JSON-LD exports in route modules.\n *\n * This is intentionally regex-based for speed during file scanning.\n * It reliably detects these direct export patterns:\n *\n * - `export const routeJsonLd = ...`\n * - `export const routeMeta = { ..., jsonLd: ... }`\n * - `export const routeJsonLd = (route) => ...` (function form)\n *\n * Known limitations (not detected):\n *\n * - re-exports: `export { routeJsonLd } from './data'`\n * - aliased exports: `export { something as routeJsonLd }`\n * - default exports: `export default { jsonLd: ... }`\n * - indirect assignment: `const data = { jsonLd: ... }; export const routeMeta = data`\n *\n * Known false-positive risks:\n *\n * - comment text containing `export const routeJsonLd`\n * - unrelated `jsonLd` text appearing after `export const routeMeta`\n *\n * Prefer the supported direct export patterns listed above.\n */\nexport function detectJsonLdModuleExports(fileContent: string): boolean {\n return (\n /export\\s+const\\s+routeJsonLd\\b/.test(fileContent) ||\n /export\\s+const\\s+routeMeta\\b[\\s\\S]*?\\bjsonLd\\b/.test(fileContent)\n );\n}\n\nexport function extractMarkdownJsonLd(rawContent: string): JsonLdObject[] {\n const { attributes } = fm<Record<string, unknown>>(rawContent);\n return normalizeJsonLd(attributes['jsonLd']);\n}\n\nexport function generateJsonLdManifestSource(\n entries: JsonLdManifestEntry[],\n outFile: string,\n): string {\n const lines: string[] = [];\n const moduleEntries = entries.filter(\n (entry): entry is JsonLdModuleManifestEntry => entry.kind === 'module',\n );\n\n lines.push('// This file is auto-generated by @analogjs/platform');\n lines.push('// Do not edit manually');\n lines.push('');\n\n lines.push(\"import type { Graph, Thing, WithContext } from 'schema-dts';\");\n\n moduleEntries.forEach((entry) => {\n lines.push(\n `import * as ${entry.importAlias} from '${toImportPath(outFile, entry.sourceFile)}';`,\n );\n });\n\n lines.push('');\n lines.push(\n 'export type AnalogJsonLdDocument = WithContext<Thing> | Graph | Array<WithContext<Thing>>;',\n );\n lines.push(\n \"export type GeneratedJsonLdManifestEntry = { routePath: string; sourceFile: string; kind: 'module' | 'content'; resolveJsonLd: () => AnalogJsonLdDocument[]; };\",\n );\n lines.push('');\n lines.push(\n 'function normalizeJsonLd(value: unknown): AnalogJsonLdDocument[] {',\n );\n lines.push(' if (Array.isArray(value)) {');\n lines.push(\n \" return value.filter((entry): entry is AnalogJsonLdDocument => typeof entry === 'object' && entry !== null && !Array.isArray(entry));\",\n );\n lines.push(' }');\n lines.push('');\n lines.push(\n \" return typeof value === 'object' && value !== null ? [value as AnalogJsonLdDocument] : [];\",\n );\n lines.push('}');\n lines.push('');\n lines.push(\n 'function resolveModuleJsonLd(routeModule: unknown): AnalogJsonLdDocument[] {',\n );\n lines.push(\n ' const typedRouteModule = routeModule as { routeJsonLd?: unknown; routeMeta?: { jsonLd?: unknown } };',\n );\n lines.push(\n // Match runtime precedence (mergeRouteJsonLdIntoRouteMeta in routes.ts):\n // routeMeta.jsonLd wins over standalone routeJsonLd.\n ' return normalizeJsonLd(typedRouteModule.routeMeta?.jsonLd ?? typedRouteModule.routeJsonLd);',\n );\n lines.push('}');\n lines.push('');\n lines.push(\n 'export const routeJsonLdManifest = new Map<string, GeneratedJsonLdManifestEntry>([',\n );\n\n entries.forEach((entry) => {\n if (entry.kind === 'module') {\n lines.push(\n ` ['${entry.routePath}', { routePath: '${entry.routePath}', sourceFile: '${entry.sourceFile}', kind: 'module', resolveJsonLd: () => resolveModuleJsonLd(${entry.importAlias}) }],`,\n );\n return;\n }\n\n lines.push(\n ` ['${entry.routePath}', { routePath: '${entry.routePath}', sourceFile: '${entry.sourceFile}', kind: 'content', resolveJsonLd: () => ${JSON.stringify(entry.jsonLd)} }],`,\n );\n });\n\n lines.push(']);');\n lines.push('');\n\n return lines.join('\\n');\n}\n\nfunction toImportPath(outFile: string, sourceFile: string): string {\n // JSON-LD entries are emitted inside the same generated route module, so\n // imports are always resolved relative to that single output file.\n const fromDir = dirname(outFile);\n const sourceNoExt = sourceFile\n .replace(/^\\//, '')\n .replace(/\\.(ts|js|analog|ag)$/, '');\n const relativePath = normalizePath(relative(fromDir, sourceNoExt));\n\n if (relativePath.startsWith('.')) {\n return relativePath;\n }\n\n return `./${relativePath}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,0BAA0B,aAA8B;AACtE,QACE,iCAAiC,KAAK,YAAY,IAClD,iDAAiD,KAAK,YAAY;;AAItE,SAAgB,sBAAsB,YAAoC;CACxE,MAAM,EAAE,eAAe,GAA4B,WAAW;AAC9D,QAAO,gBAAgB,WAAW,UAAU;;AAG9C,SAAgB,6BACd,SACA,SACQ;CACR,MAAM,QAAkB,EAAE;CAC1B,MAAM,gBAAgB,QAAQ,QAC3B,UAA8C,MAAM,SAAS,SAC/D;AAED,OAAM,KAAK,uDAAuD;AAClE,OAAM,KAAK,0BAA0B;AACrC,OAAM,KAAK,GAAG;AAEd,OAAM,KAAK,+DAA+D;AAE1E,eAAc,SAAS,UAAU;AAC/B,QAAM,KACJ,eAAe,MAAM,YAAY,SAAS,aAAa,SAAS,MAAM,WAAW,CAAC,IACnF;GACD;AAEF,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,6FACD;AACD,OAAM,KACJ,kKACD;AACD,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,qEACD;AACD,OAAM,KAAK,gCAAgC;AAC3C,OAAM,KACJ,2IACD;AACD,OAAM,KAAK,MAAM;AACjB,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,+FACD;AACD,OAAM,KAAK,IAAI;AACf,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,+EACD;AACD,OAAM,KACJ,yGACD;AACD,OAAM,KAGJ,gGACD;AACD,OAAM,KAAK,IAAI;AACf,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,qFACD;AAED,SAAQ,SAAS,UAAU;AACzB,MAAI,MAAM,SAAS,UAAU;AAC3B,SAAM,KACJ,OAAO,MAAM,UAAU,mBAAmB,MAAM,UAAU,kBAAkB,MAAM,WAAW,8DAA8D,MAAM,YAAY,OAC9K;AACD;;AAGF,QAAM,KACJ,OAAO,MAAM,UAAU,mBAAmB,MAAM,UAAU,kBAAkB,MAAM,WAAW,2CAA2C,KAAK,UAAU,MAAM,OAAO,CAAC,MACtK;GACD;AAEF,OAAM,KAAK,MAAM;AACjB,OAAM,KAAK,GAAG;AAEd,QAAO,MAAM,KAAK,KAAK;;AAGzB,SAAS,aAAa,SAAiB,YAA4B;CAOjE,MAAM,eAAe,cAAc,SAJnB,QAAQ,QAAQ,EACZ,WACjB,QAAQ,OAAO,GAAG,CAClB,QAAQ,wBAAwB,GAAG,CAC2B,CAAC;AAElE,KAAI,aAAa,WAAW,IAAI,CAC9B,QAAO;AAGT,QAAO,KAAK"}
@@ -3,6 +3,9 @@
3
3
  import analog from '@analogjs/platform';
4
4
  import { defineConfig } from 'vite';
5
5
  import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
6
+ <% if (addTailwind) { %>
7
+ import tailwindcss from '@tailwindcss/vite';
8
+ <% } %>
6
9
 
7
10
  // https://vitejs.dev/config/
8
11
  export default defineConfig(({ mode }) => {
@@ -20,6 +23,9 @@ export default defineConfig(({ mode }) => {
20
23
  },
21
24
  },
22
25
  plugins: [
26
+ <% if (addTailwind) { %>
27
+ tailwindcss(),
28
+ <% } %>
23
29
  analog(),
24
30
  nxViteTsPaths(),
25
31
  ],
@@ -4,7 +4,6 @@ import analog from '@analogjs/platform';
4
4
  import { defineConfig, Plugin } from 'vite';
5
5
  import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
6
6
  <% if (addTailwind) { %>
7
- // @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
8
7
  import tailwindcss from '@tailwindcss/vite';
9
8
  <% } %>
10
9
 
@@ -4,7 +4,6 @@ import analog from '@analogjs/platform';
4
4
  import { defineConfig, Plugin } from 'vite';
5
5
  import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
6
6
  <% if (addTailwind) { %>
7
- // @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
8
7
  import tailwindcss from '@tailwindcss/vite';
9
8
  <% } %>
10
9
 
@@ -4,7 +4,6 @@ import analog from '@analogjs/platform';
4
4
  import { defineConfig } from 'vite';
5
5
  import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
6
6
  <% if (addTailwind) { %>
7
- // @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
8
7
  import tailwindcss from '@tailwindcss/vite';
9
8
  <% } %>
10
9
 
@@ -10,9 +10,7 @@ async function setupTailwindGenerator(tree, rawOptions) {
10
10
  require_add_tailwind_helpers.detectTailwindInstalledVersion(tree);
11
11
  let installTask = () => {};
12
12
  if (!options.skipPackageJson) installTask = require_add_tailwind_helpers.addTailwindRequiredPackages(tree);
13
- require_add_tailwind_helpers.addTailwindConfigFile(tree, options, project);
14
13
  if (project.projectType === "application") require_add_tailwind_helpers.updateApplicationStyles(tree, options, project);
15
- else if (project.projectType === "library") require_add_tailwind_helpers.addTailwindConfigPathToProject(tree, options, project);
16
14
  if (!options.skipFormat) await (0, _nx_devkit.formatFiles)(tree);
17
15
  return installTask;
18
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add-tailwind-config.js","names":[],"sources":["../../../../../../../../../../packages/nx-plugin/src/generators/app/lib/add-tailwind-config.ts"],"sourcesContent":["import {\n formatFiles,\n GeneratorCallback,\n readProjectConfiguration,\n Tree,\n} from '@nx/devkit';\nimport {\n addTailwindConfigFile,\n addTailwindConfigPathToProject,\n addTailwindRequiredPackages,\n detectTailwindInstalledVersion,\n normalizeOptions,\n updateApplicationStyles,\n} from './add-tailwind-helpers';\n\nexport async function addTailwindConfig(\n tree: Tree,\n projectName: string,\n): Promise<void> {\n await setupTailwindGenerator(tree, {\n project: projectName,\n });\n}\n\nexport interface GeneratorOptions {\n project: string;\n buildTarget?: string;\n skipFormat?: boolean;\n stylesEntryPoint?: string;\n skipPackageJson?: boolean;\n}\n\nexport interface NormalizedGeneratorOptions extends GeneratorOptions {\n buildTarget: string;\n}\n\nexport async function setupTailwindGenerator(\n tree: Tree,\n rawOptions: GeneratorOptions,\n): Promise<GeneratorCallback> {\n const options = normalizeOptions(rawOptions);\n const project = readProjectConfiguration(tree, options.project);\n\n // TODO: use return value for v5+ branching when needed\n detectTailwindInstalledVersion(tree);\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let installTask: GeneratorCallback = () => {};\n if (!options.skipPackageJson) {\n installTask = addTailwindRequiredPackages(tree);\n }\n\n addTailwindConfigFile(tree, options, project);\n\n if (project.projectType === 'application') {\n updateApplicationStyles(tree, options, project);\n } else if (project.projectType === 'library') {\n addTailwindConfigPathToProject(tree, options, project);\n }\n\n if (!options.skipFormat) {\n await formatFiles(tree);\n }\n\n return installTask;\n}\n"],"mappings":";;;AAeA,eAAsB,kBACpB,MACA,aACe;AACf,OAAM,uBAAuB,MAAM,EACjC,SAAS,aACV,CAAC;;AAeJ,eAAsB,uBACpB,MACA,YAC4B;CAC5B,MAAM,UAAU,6BAAA,iBAAiB,WAAW;CAC5C,MAAM,WAAA,GAAA,WAAA,0BAAmC,MAAM,QAAQ,QAAQ;AAG/D,8BAAA,+BAA+B,KAAK;CAGpC,IAAI,oBAAuC;AAC3C,KAAI,CAAC,QAAQ,gBACX,eAAc,6BAAA,4BAA4B,KAAK;AAGjD,8BAAA,sBAAsB,MAAM,SAAS,QAAQ;AAE7C,KAAI,QAAQ,gBAAgB,cAC1B,8BAAA,wBAAwB,MAAM,SAAS,QAAQ;UACtC,QAAQ,gBAAgB,UACjC,8BAAA,+BAA+B,MAAM,SAAS,QAAQ;AAGxD,KAAI,CAAC,QAAQ,WACX,QAAA,GAAA,WAAA,aAAkB,KAAK;AAGzB,QAAO"}
1
+ {"version":3,"file":"add-tailwind-config.js","names":[],"sources":["../../../../../../../../../../packages/nx-plugin/src/generators/app/lib/add-tailwind-config.ts"],"sourcesContent":["import {\n formatFiles,\n GeneratorCallback,\n readProjectConfiguration,\n Tree,\n} from '@nx/devkit';\nimport {\n addTailwindRequiredPackages,\n detectTailwindInstalledVersion,\n normalizeOptions,\n updateApplicationStyles,\n} from './add-tailwind-helpers';\n\nexport async function addTailwindConfig(\n tree: Tree,\n projectName: string,\n): Promise<void> {\n await setupTailwindGenerator(tree, {\n project: projectName,\n });\n}\n\nexport interface GeneratorOptions {\n project: string;\n buildTarget?: string;\n skipFormat?: boolean;\n stylesEntryPoint?: string;\n skipPackageJson?: boolean;\n}\n\nexport interface NormalizedGeneratorOptions extends GeneratorOptions {\n buildTarget: string;\n}\n\nexport async function setupTailwindGenerator(\n tree: Tree,\n rawOptions: GeneratorOptions,\n): Promise<GeneratorCallback> {\n const options = normalizeOptions(rawOptions);\n const project = readProjectConfiguration(tree, options.project);\n\n // TODO: use return value for v5+ branching when needed\n detectTailwindInstalledVersion(tree);\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let installTask: GeneratorCallback = () => {};\n if (!options.skipPackageJson) {\n installTask = addTailwindRequiredPackages(tree);\n }\n\n if (project.projectType === 'application') {\n updateApplicationStyles(tree, options, project);\n }\n\n if (!options.skipFormat) {\n await formatFiles(tree);\n }\n\n return installTask;\n}\n"],"mappings":";;;AAaA,eAAsB,kBACpB,MACA,aACe;AACf,OAAM,uBAAuB,MAAM,EACjC,SAAS,aACV,CAAC;;AAeJ,eAAsB,uBACpB,MACA,YAC4B;CAC5B,MAAM,UAAU,6BAAA,iBAAiB,WAAW;CAC5C,MAAM,WAAA,GAAA,WAAA,0BAAmC,MAAM,QAAQ,QAAQ;AAG/D,8BAAA,+BAA+B,KAAK;CAGpC,IAAI,oBAAuC;AAC3C,KAAI,CAAC,QAAQ,gBACX,eAAc,6BAAA,4BAA4B,KAAK;AAGjD,KAAI,QAAQ,gBAAgB,cAC1B,8BAAA,wBAAwB,MAAM,SAAS,QAAQ;AAGjD,KAAI,CAAC,QAAQ,WACX,QAAA,GAAA,WAAA,aAAkB,KAAK;AAGzB,QAAO"}
@@ -4,5 +4,3 @@ export declare function normalizeOptions(options: GeneratorOptions): NormalizedG
4
4
  export declare function detectTailwindInstalledVersion(tree: Tree): "4" | "5" | undefined;
5
5
  export declare function addTailwindRequiredPackages(tree: Tree): GeneratorCallback;
6
6
  export declare function updateApplicationStyles(tree: Tree, options: NormalizedGeneratorOptions, project: ProjectConfiguration): void;
7
- export declare function addTailwindConfigPathToProject(tree: Tree, options: NormalizedGeneratorOptions, project: ProjectConfiguration): void;
8
- export declare function addTailwindConfigFile(tree: Tree, options: GeneratorOptions, project: ProjectConfiguration): void;
@@ -1,7 +1,6 @@
1
1
  const require_tailwind_dependencies = require("../versions/tailwind-dependencies.js");
2
2
  let _nx_devkit = require("@nx/devkit");
3
3
  let semver = require("semver");
4
- let node_path = require("node:path");
5
4
  let _nx_devkit_src_utils_semver = require("@nx/devkit/src/utils/semver");
6
5
  //#region packages/nx-plugin/src/generators/app/lib/add-tailwind-helpers.ts
7
6
  function normalizeOptions(options) {
@@ -21,9 +20,8 @@ function detectTailwindInstalledVersion(tree) {
21
20
  function addTailwindRequiredPackages(tree) {
22
21
  const pkgVersions = require_tailwind_dependencies.getTailwindDependencies();
23
22
  return (0, _nx_devkit.addDependenciesToPackageJson)(tree, {
24
- postcss: pkgVersions.postcss,
25
23
  tailwindcss: pkgVersions.tailwindcss,
26
- "@tailwindcss/postcss": pkgVersions["@tailwindcss/postcss"]
24
+ "@tailwindcss/vite": pkgVersions["@tailwindcss/vite"]
27
25
  }, {});
28
26
  }
29
27
  function updateApplicationStyles(tree, options, project) {
@@ -55,30 +53,7 @@ function findStylesEntryPoint(tree, options, project) {
55
53
  if (!style) return;
56
54
  return typeof style === "string" ? style : style.input;
57
55
  }
58
- function addTailwindConfigPathToProject(tree, options, project) {
59
- const buildTarget = project.targets?.[options.buildTarget];
60
- if (!buildTarget) throw new Error(_nx_devkit.stripIndents`The target "${options.buildTarget}" was not found for project "${options.project}".
61
- If you are using a different build target, please provide it using the "--buildTarget" option.
62
- If the project is not a buildable or publishable library, you don't need to setup TailwindCSS for it.`);
63
- if (buildTarget.options?.tailwindConfig && tree.exists(buildTarget.options.tailwindConfig)) throw new Error(_nx_devkit.stripIndents`The "${buildTarget.options.tailwindConfig}" file is already configured for the project "${options.project}". Are you sure this is the right project to set up Tailwind?
64
- If you are sure, you can remove the configuration and re-run the generator.`);
65
- buildTarget.options = {
66
- ...buildTarget.options,
67
- tailwindConfig: (0, _nx_devkit.joinPathFragments)(project.root, "tailwind.config.ts")
68
- };
69
- (0, _nx_devkit.updateProjectConfiguration)(tree, options.project, project);
70
- }
71
- function addTailwindConfigFile(tree, options, project) {
72
- if (tree.exists((0, _nx_devkit.joinPathFragments)(project.root, "tailwind.config.ts")) || tree.exists((0, _nx_devkit.joinPathFragments)(project.root, "tailwind.config.js"))) throw new Error(_nx_devkit.stripIndents`The "tailwind.config" file already exists in the project "${options.project}". Are you sure this is the right project to set up Tailwind?
73
- If you are sure, you can remove the existing file and re-run the generator.`);
74
- (0, _nx_devkit.generateFiles)(tree, (0, _nx_devkit.joinPathFragments)(__dirname, "..", "files", "tailwind/v4"), project.root, {
75
- relativeSourceRoot: (0, node_path.relative)(project.root, project.sourceRoot ?? project.root),
76
- template: ""
77
- });
78
- }
79
56
  //#endregion
80
- exports.addTailwindConfigFile = addTailwindConfigFile;
81
- exports.addTailwindConfigPathToProject = addTailwindConfigPathToProject;
82
57
  exports.addTailwindRequiredPackages = addTailwindRequiredPackages;
83
58
  exports.detectTailwindInstalledVersion = detectTailwindInstalledVersion;
84
59
  exports.normalizeOptions = normalizeOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"add-tailwind-helpers.js","names":[],"sources":["../../../../../../../../../../packages/nx-plugin/src/generators/app/lib/add-tailwind-helpers.ts"],"sourcesContent":["import { checkAndCleanWithSemver } from '@nx/devkit/src/utils/semver';\nimport { getTailwindDependencies } from '../versions/tailwind-dependencies';\nimport { lt } from 'semver';\nimport {\n Tree,\n readJson,\n addDependenciesToPackageJson,\n GeneratorCallback,\n ProjectConfiguration,\n joinPathFragments,\n stripIndents,\n updateProjectConfiguration,\n generateFiles,\n} from '@nx/devkit';\nimport {\n GeneratorOptions,\n NormalizedGeneratorOptions,\n} from './add-tailwind-config';\nimport { relative } from 'node:path';\n\nexport function normalizeOptions(\n options: GeneratorOptions,\n): NormalizedGeneratorOptions {\n return {\n ...options,\n buildTarget: options.buildTarget || 'build',\n };\n}\n\nexport function detectTailwindInstalledVersion(\n tree: Tree,\n): '4' | '5' | undefined {\n const { dependencies, devDependencies } = readJson(tree, 'package.json');\n const tailwindVersion =\n dependencies?.tailwindcss ?? devDependencies?.tailwindcss;\n\n if (!tailwindVersion) {\n return undefined;\n }\n\n const version = checkAndCleanWithSemver('tailwindcss', tailwindVersion);\n if (lt(version, '4.0.0')) {\n throw new Error(\n `The Tailwind CSS version \"${tailwindVersion}\" is not supported. Please upgrade to v4.0.0 or higher.`,\n );\n }\n return lt(version, '5.0.0') ? '4' : '5';\n}\n\nexport function addTailwindRequiredPackages(tree: Tree): GeneratorCallback {\n const pkgVersions = getTailwindDependencies();\n return addDependenciesToPackageJson(\n tree,\n {\n postcss: pkgVersions.postcss,\n tailwindcss: pkgVersions.tailwindcss,\n '@tailwindcss/postcss': pkgVersions['@tailwindcss/postcss'],\n },\n {},\n );\n}\n\nexport function updateApplicationStyles(\n tree: Tree,\n options: NormalizedGeneratorOptions,\n project: ProjectConfiguration,\n): void {\n let stylesEntryPoint = options.stylesEntryPoint;\n\n if (stylesEntryPoint && !tree.exists(stylesEntryPoint)) {\n throw new Error(\n `The provided styles entry point \"${stylesEntryPoint}\" could not be found.`,\n );\n }\n\n if (!stylesEntryPoint) {\n stylesEntryPoint = findStylesEntryPoint(tree, options, project);\n\n if (!stylesEntryPoint) {\n throw new Error(\n stripIndents`Could not find a styles entry point for project \"${options.project}\".\n Please specify a styles entry point using the \"--stylesEntryPoint\" option.`,\n );\n }\n }\n\n if (!stylesEntryPoint.endsWith('.css')) {\n throw new Error(\n `Tailwind CSS v4 is not compatible with any css preprocessors like sass or less. Please use a css file as the styles entry point.`,\n );\n }\n\n const stylesEntryPointContent = tree.read(stylesEntryPoint, 'utf-8');\n\n tree.write(\n stylesEntryPoint,\n stripIndents`@import \"tailwindcss\";\n\n\n ${stylesEntryPointContent}`,\n );\n}\n\nfunction findStylesEntryPoint(\n tree: Tree,\n options: NormalizedGeneratorOptions,\n project: ProjectConfiguration,\n): string | undefined {\n // first check for common names\n const possibleStylesEntryPoints = [\n joinPathFragments(project.sourceRoot ?? project.root, 'styles.css'),\n joinPathFragments(project.sourceRoot ?? project.root, 'styles.scss'),\n joinPathFragments(project.sourceRoot ?? project.root, 'styles.sass'),\n joinPathFragments(project.sourceRoot ?? project.root, 'styles.less'),\n ];\n\n const stylesEntryPoint = possibleStylesEntryPoints.find((s) =>\n tree.exists(s),\n );\n if (stylesEntryPoint) {\n return stylesEntryPoint;\n }\n\n // then check for the specified styles in the build configuration if it exists\n const styles: Array<string | { input: string; inject: boolean }> =\n project.targets?.[options.buildTarget].options?.styles;\n\n if (!styles) {\n return undefined;\n }\n\n // find the first style that belongs to the project source\n const style = styles.find((s) =>\n typeof s === 'string'\n ? s.startsWith(project.root) && tree.exists(s)\n : s.input.startsWith(project.root) &&\n s.inject !== false &&\n tree.exists(s.input),\n );\n\n if (!style) {\n return undefined;\n }\n\n return typeof style === 'string' ? style : style.input;\n}\n\nexport function addTailwindConfigPathToProject(\n tree: Tree,\n options: NormalizedGeneratorOptions,\n project: ProjectConfiguration,\n): void {\n const buildTarget = project.targets?.[options.buildTarget];\n\n if (!buildTarget) {\n throw new Error(\n stripIndents`The target \"${options.buildTarget}\" was not found for project \"${options.project}\".\n If you are using a different build target, please provide it using the \"--buildTarget\" option.\n If the project is not a buildable or publishable library, you don't need to setup TailwindCSS for it.`,\n );\n }\n\n if (\n buildTarget.options?.tailwindConfig &&\n tree.exists(buildTarget.options.tailwindConfig)\n ) {\n throw new Error(\n stripIndents`The \"${buildTarget.options.tailwindConfig}\" file is already configured for the project \"${options.project}\". Are you sure this is the right project to set up Tailwind?\n If you are sure, you can remove the configuration and re-run the generator.`,\n );\n }\n\n buildTarget.options = {\n ...buildTarget.options,\n tailwindConfig: joinPathFragments(project.root, 'tailwind.config.ts'),\n };\n\n updateProjectConfiguration(tree, options.project, project);\n}\n\nexport function addTailwindConfigFile(\n tree: Tree,\n options: GeneratorOptions,\n project: ProjectConfiguration,\n): void {\n if (\n tree.exists(joinPathFragments(project.root, 'tailwind.config.ts')) ||\n tree.exists(joinPathFragments(project.root, 'tailwind.config.js'))\n ) {\n throw new Error(\n stripIndents`The \"tailwind.config\" file already exists in the project \"${options.project}\". Are you sure this is the right project to set up Tailwind?\n If you are sure, you can remove the existing file and re-run the generator.`,\n );\n }\n\n generateFiles(\n tree,\n joinPathFragments(__dirname, '..', 'files', 'tailwind/v4'),\n project.root,\n {\n relativeSourceRoot: relative(\n project.root,\n project.sourceRoot ?? project.root,\n ),\n template: '',\n },\n );\n}\n"],"mappings":";;;;;;AAoBA,SAAgB,iBACd,SAC4B;AAC5B,QAAO;EACL,GAAG;EACH,aAAa,QAAQ,eAAe;EACrC;;AAGH,SAAgB,+BACd,MACuB;CACvB,MAAM,EAAE,cAAc,qBAAA,GAAA,WAAA,UAA6B,MAAM,eAAe;CACxE,MAAM,kBACJ,cAAc,eAAe,iBAAiB;AAEhD,KAAI,CAAC,gBACH;CAGF,MAAM,WAAA,GAAA,4BAAA,yBAAkC,eAAe,gBAAgB;AACvE,MAAA,GAAA,OAAA,IAAO,SAAS,QAAQ,CACtB,OAAM,IAAI,MACR,6BAA6B,gBAAgB,yDAC9C;AAEH,SAAA,GAAA,OAAA,IAAU,SAAS,QAAQ,GAAG,MAAM;;AAGtC,SAAgB,4BAA4B,MAA+B;CACzE,MAAM,cAAc,8BAAA,yBAAyB;AAC7C,SAAA,GAAA,WAAA,8BACE,MACA;EACE,SAAS,YAAY;EACrB,aAAa,YAAY;EACzB,wBAAwB,YAAY;EACrC,EACD,EAAE,CACH;;AAGH,SAAgB,wBACd,MACA,SACA,SACM;CACN,IAAI,mBAAmB,QAAQ;AAE/B,KAAI,oBAAoB,CAAC,KAAK,OAAO,iBAAiB,CACpD,OAAM,IAAI,MACR,oCAAoC,iBAAiB,uBACtD;AAGH,KAAI,CAAC,kBAAkB;AACrB,qBAAmB,qBAAqB,MAAM,SAAS,QAAQ;AAE/D,MAAI,CAAC,iBACH,OAAM,IAAI,MACR,WAAA,YAAY,oDAAoD,QAAQ,QAAQ;oFAEjF;;AAIL,KAAI,CAAC,iBAAiB,SAAS,OAAO,CACpC,OAAM,IAAI,MACR,mIACD;CAGH,MAAM,0BAA0B,KAAK,KAAK,kBAAkB,QAAQ;AAEpE,MAAK,MACH,kBACA,WAAA,YAAY;;;MAGV,0BACH;;AAGH,SAAS,qBACP,MACA,SACA,SACoB;CASpB,MAAM,mBAP4B;oCACd,QAAQ,cAAc,QAAQ,MAAM,aAAa;oCACjD,QAAQ,cAAc,QAAQ,MAAM,cAAc;oCAClD,QAAQ,cAAc,QAAQ,MAAM,cAAc;oCAClD,QAAQ,cAAc,QAAQ,MAAM,cAAc;EACrE,CAEkD,MAAM,MACvD,KAAK,OAAO,EAAE,CACf;AACD,KAAI,iBACF,QAAO;CAIT,MAAM,SACJ,QAAQ,UAAU,QAAQ,aAAa,SAAS;AAElD,KAAI,CAAC,OACH;CAIF,MAAM,QAAQ,OAAO,MAAM,MACzB,OAAO,MAAM,WACT,EAAE,WAAW,QAAQ,KAAK,IAAI,KAAK,OAAO,EAAE,GAC5C,EAAE,MAAM,WAAW,QAAQ,KAAK,IAChC,EAAE,WAAW,SACb,KAAK,OAAO,EAAE,MAAM,CACzB;AAED,KAAI,CAAC,MACH;AAGF,QAAO,OAAO,UAAU,WAAW,QAAQ,MAAM;;AAGnD,SAAgB,+BACd,MACA,SACA,SACM;CACN,MAAM,cAAc,QAAQ,UAAU,QAAQ;AAE9C,KAAI,CAAC,YACH,OAAM,IAAI,MACR,WAAA,YAAY,eAAe,QAAQ,YAAY,+BAA+B,QAAQ,QAAQ;;6GAG/F;AAGH,KACE,YAAY,SAAS,kBACrB,KAAK,OAAO,YAAY,QAAQ,eAAe,CAE/C,OAAM,IAAI,MACR,WAAA,YAAY,QAAQ,YAAY,QAAQ,eAAe,gDAAgD,QAAQ,QAAQ;mFAExH;AAGH,aAAY,UAAU;EACpB,GAAG,YAAY;EACf,iBAAA,GAAA,WAAA,mBAAkC,QAAQ,MAAM,qBAAqB;EACtE;AAED,EAAA,GAAA,WAAA,4BAA2B,MAAM,QAAQ,SAAS,QAAQ;;AAG5D,SAAgB,sBACd,MACA,SACA,SACM;AACN,KACE,KAAK,QAAA,GAAA,WAAA,mBAAyB,QAAQ,MAAM,qBAAqB,CAAC,IAClE,KAAK,QAAA,GAAA,WAAA,mBAAyB,QAAQ,MAAM,qBAAqB,CAAC,CAElE,OAAM,IAAI,MACR,WAAA,YAAY,6DAA6D,QAAQ,QAAQ;mFAE1F;AAGH,EAAA,GAAA,WAAA,eACE,OAAA,GAAA,WAAA,mBACkB,WAAW,MAAM,SAAS,cAAc,EAC1D,QAAQ,MACR;EACE,qBAAA,GAAA,UAAA,UACE,QAAQ,MACR,QAAQ,cAAc,QAAQ,KAC/B;EACD,UAAU;EACX,CACF"}
1
+ {"version":3,"file":"add-tailwind-helpers.js","names":[],"sources":["../../../../../../../../../../packages/nx-plugin/src/generators/app/lib/add-tailwind-helpers.ts"],"sourcesContent":["import { checkAndCleanWithSemver } from '@nx/devkit/src/utils/semver';\nimport { getTailwindDependencies } from '../versions/tailwind-dependencies';\nimport { lt } from 'semver';\nimport {\n Tree,\n readJson,\n addDependenciesToPackageJson,\n GeneratorCallback,\n ProjectConfiguration,\n joinPathFragments,\n stripIndents,\n} from '@nx/devkit';\nimport {\n GeneratorOptions,\n NormalizedGeneratorOptions,\n} from './add-tailwind-config';\n\nexport function normalizeOptions(\n options: GeneratorOptions,\n): NormalizedGeneratorOptions {\n return {\n ...options,\n buildTarget: options.buildTarget || 'build',\n };\n}\n\nexport function detectTailwindInstalledVersion(\n tree: Tree,\n): '4' | '5' | undefined {\n const { dependencies, devDependencies } = readJson(tree, 'package.json');\n const tailwindVersion =\n dependencies?.tailwindcss ?? devDependencies?.tailwindcss;\n\n if (!tailwindVersion) {\n return undefined;\n }\n\n const version = checkAndCleanWithSemver('tailwindcss', tailwindVersion);\n if (lt(version, '4.0.0')) {\n throw new Error(\n `The Tailwind CSS version \"${tailwindVersion}\" is not supported. Please upgrade to v4.0.0 or higher.`,\n );\n }\n return lt(version, '5.0.0') ? '4' : '5';\n}\n\nexport function addTailwindRequiredPackages(tree: Tree): GeneratorCallback {\n const pkgVersions = getTailwindDependencies();\n return addDependenciesToPackageJson(\n tree,\n {\n tailwindcss: pkgVersions.tailwindcss,\n '@tailwindcss/vite': pkgVersions['@tailwindcss/vite'],\n },\n {},\n );\n}\n\nexport function updateApplicationStyles(\n tree: Tree,\n options: NormalizedGeneratorOptions,\n project: ProjectConfiguration,\n): void {\n let stylesEntryPoint = options.stylesEntryPoint;\n\n if (stylesEntryPoint && !tree.exists(stylesEntryPoint)) {\n throw new Error(\n `The provided styles entry point \"${stylesEntryPoint}\" could not be found.`,\n );\n }\n\n if (!stylesEntryPoint) {\n stylesEntryPoint = findStylesEntryPoint(tree, options, project);\n\n if (!stylesEntryPoint) {\n throw new Error(\n stripIndents`Could not find a styles entry point for project \"${options.project}\".\n Please specify a styles entry point using the \"--stylesEntryPoint\" option.`,\n );\n }\n }\n\n if (!stylesEntryPoint.endsWith('.css')) {\n throw new Error(\n `Tailwind CSS v4 is not compatible with any css preprocessors like sass or less. Please use a css file as the styles entry point.`,\n );\n }\n\n const stylesEntryPointContent = tree.read(stylesEntryPoint, 'utf-8');\n\n tree.write(\n stylesEntryPoint,\n stripIndents`@import \"tailwindcss\";\n\n\n ${stylesEntryPointContent}`,\n );\n}\n\nfunction findStylesEntryPoint(\n tree: Tree,\n options: NormalizedGeneratorOptions,\n project: ProjectConfiguration,\n): string | undefined {\n // first check for common names\n const possibleStylesEntryPoints = [\n joinPathFragments(project.sourceRoot ?? project.root, 'styles.css'),\n joinPathFragments(project.sourceRoot ?? project.root, 'styles.scss'),\n joinPathFragments(project.sourceRoot ?? project.root, 'styles.sass'),\n joinPathFragments(project.sourceRoot ?? project.root, 'styles.less'),\n ];\n\n const stylesEntryPoint = possibleStylesEntryPoints.find((s) =>\n tree.exists(s),\n );\n if (stylesEntryPoint) {\n return stylesEntryPoint;\n }\n\n // then check for the specified styles in the build configuration if it exists\n const styles: Array<string | { input: string; inject: boolean }> =\n project.targets?.[options.buildTarget].options?.styles;\n\n if (!styles) {\n return undefined;\n }\n\n // find the first style that belongs to the project source\n const style = styles.find((s) =>\n typeof s === 'string'\n ? s.startsWith(project.root) && tree.exists(s)\n : s.input.startsWith(project.root) &&\n s.inject !== false &&\n tree.exists(s.input),\n );\n\n if (!style) {\n return undefined;\n }\n\n return typeof style === 'string' ? style : style.input;\n}\n"],"mappings":";;;;;AAiBA,SAAgB,iBACd,SAC4B;AAC5B,QAAO;EACL,GAAG;EACH,aAAa,QAAQ,eAAe;EACrC;;AAGH,SAAgB,+BACd,MACuB;CACvB,MAAM,EAAE,cAAc,qBAAA,GAAA,WAAA,UAA6B,MAAM,eAAe;CACxE,MAAM,kBACJ,cAAc,eAAe,iBAAiB;AAEhD,KAAI,CAAC,gBACH;CAGF,MAAM,WAAA,GAAA,4BAAA,yBAAkC,eAAe,gBAAgB;AACvE,MAAA,GAAA,OAAA,IAAO,SAAS,QAAQ,CACtB,OAAM,IAAI,MACR,6BAA6B,gBAAgB,yDAC9C;AAEH,SAAA,GAAA,OAAA,IAAU,SAAS,QAAQ,GAAG,MAAM;;AAGtC,SAAgB,4BAA4B,MAA+B;CACzE,MAAM,cAAc,8BAAA,yBAAyB;AAC7C,SAAA,GAAA,WAAA,8BACE,MACA;EACE,aAAa,YAAY;EACzB,qBAAqB,YAAY;EAClC,EACD,EAAE,CACH;;AAGH,SAAgB,wBACd,MACA,SACA,SACM;CACN,IAAI,mBAAmB,QAAQ;AAE/B,KAAI,oBAAoB,CAAC,KAAK,OAAO,iBAAiB,CACpD,OAAM,IAAI,MACR,oCAAoC,iBAAiB,uBACtD;AAGH,KAAI,CAAC,kBAAkB;AACrB,qBAAmB,qBAAqB,MAAM,SAAS,QAAQ;AAE/D,MAAI,CAAC,iBACH,OAAM,IAAI,MACR,WAAA,YAAY,oDAAoD,QAAQ,QAAQ;oFAEjF;;AAIL,KAAI,CAAC,iBAAiB,SAAS,OAAO,CACpC,OAAM,IAAI,MACR,mIACD;CAGH,MAAM,0BAA0B,KAAK,KAAK,kBAAkB,QAAQ;AAEpE,MAAK,MACH,kBACA,WAAA,YAAY;;;MAGV,0BACH;;AAGH,SAAS,qBACP,MACA,SACA,SACoB;CASpB,MAAM,mBAP4B;oCACd,QAAQ,cAAc,QAAQ,MAAM,aAAa;oCACjD,QAAQ,cAAc,QAAQ,MAAM,cAAc;oCAClD,QAAQ,cAAc,QAAQ,MAAM,cAAc;oCAClD,QAAQ,cAAc,QAAQ,MAAM,cAAc;EACrE,CAEkD,MAAM,MACvD,KAAK,OAAO,EAAE,CACf;AACD,KAAI,iBACF,QAAO;CAIT,MAAM,SACJ,QAAQ,UAAU,QAAQ,aAAa,SAAS;AAElD,KAAI,CAAC,OACH;CAIF,MAAM,QAAQ,OAAO,MAAM,MACzB,OAAO,MAAM,WACT,EAAE,WAAW,QAAQ,KAAK,IAAI,KAAK,OAAO,EAAE,GAC5C,EAAE,MAAM,WAAW,QAAQ,KAAK,IAChC,EAAE,WAAW,SACb,KAAK,OAAO,EAAE,MAAM,CACzB;AAED,KAAI,CAAC,MACH;AAGF,QAAO,OAAO,UAAU,WAAW,QAAQ,MAAM"}
@@ -1,9 +1,9 @@
1
1
  export declare const V18_X_NX_DEVKIT = "^20.0.0";
2
2
  export declare const V18_X_NX_ANGULAR = "^20.0.0";
3
- export declare const V18_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.12";
4
- export declare const V18_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.12";
5
- export declare const V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.12";
6
- export declare const V18_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.12";
3
+ export declare const V18_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.14";
4
+ export declare const V18_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.14";
5
+ export declare const V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.14";
6
+ export declare const V18_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.14";
7
7
  export declare const V18_X_FRONT_MATTER = "^4.0.2";
8
8
  export declare const V18_X_MARKED = "^15.0.7";
9
9
  export declare const V18_X_MARKED_GFM_HEADING_ID = "^4.1.1";
@@ -11,11 +11,9 @@ export declare const V18_X_MARKED_HIGHLIGHT = "^2.2.1";
11
11
  export declare const V18_X_MARKED_MANGLE = "^1.1.10";
12
12
  export declare const V18_X_MERMAID = "^10.2.4";
13
13
  export declare const V18_X_PRISMJS = "^1.29.0";
14
- export declare const V18_X_TAILWINDCSS = "^4.1.4";
15
- export declare const V18_X_TAILWINDCSS_VITE = "^4.1.4";
16
- export declare const V18_X_POSTCSS = "^8.5.3";
17
- export declare const V18_X_AUTOPREFIXER = "^10.4.0";
18
- export declare const V18_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.12";
14
+ export declare const V18_X_TAILWINDCSS = "^4.2.2";
15
+ export declare const V18_X_TAILWINDCSS_VITE = "^4.2.2";
16
+ export declare const V18_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.14";
19
17
  export declare const V18_X_ANGULAR_DEVKIT_BUILD_ANGULAR = "^19.0.0";
20
18
  export declare const V18_X_NX_VITE = "^21.0.0";
21
19
  export declare const V18_X_NX_LINTER = "^21.0.0";
@@ -1,9 +1,7 @@
1
1
  //#region packages/nx-plugin/src/generators/app/versions/nx_18_X/versions.ts
2
- var V18_X_TAILWINDCSS = "^4.1.4";
3
- var V18_X_TAILWINDCSS_VITE = "^4.1.4";
4
- var V18_X_POSTCSS = "^8.5.3";
2
+ var V18_X_TAILWINDCSS = "^4.2.2";
3
+ var V18_X_TAILWINDCSS_VITE = "^4.2.2";
5
4
  //#endregion
6
- exports.V18_X_POSTCSS = V18_X_POSTCSS;
7
5
  exports.V18_X_TAILWINDCSS = V18_X_TAILWINDCSS;
8
6
  exports.V18_X_TAILWINDCSS_VITE = V18_X_TAILWINDCSS_VITE;
9
7
 
@@ -1 +1 @@
1
- {"version":3,"file":"versions.js","names":[],"sources":["../../../../../../../../../../../packages/nx-plugin/src/generators/app/versions/nx_18_X/versions.ts"],"sourcesContent":["// V18_X\n// dependencies\nexport const V18_X_NX_DEVKIT = '^20.0.0';\nexport const V18_X_NX_ANGULAR = '^20.0.0';\nexport const V18_X_ANALOG_JS_CONTENT = '^3.0.0-alpha.12';\nexport const V18_X_ANALOG_JS_ROUTER = '^3.0.0-alpha.12';\nexport const V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^3.0.0-alpha.12';\nexport const V18_X_ANALOG_JS_VITEST_ANGULAR = '^3.0.0-alpha.12';\nexport const V18_X_FRONT_MATTER = '^4.0.2';\nexport const V18_X_MARKED = '^15.0.7';\nexport const V18_X_MARKED_GFM_HEADING_ID = '^4.1.1';\nexport const V18_X_MARKED_HIGHLIGHT = '^2.2.1';\nexport const V18_X_MARKED_MANGLE = '^1.1.10';\nexport const V18_X_MERMAID = '^10.2.4';\nexport const V18_X_PRISMJS = '^1.29.0';\nexport const V18_X_TAILWINDCSS = '^4.1.4';\nexport const V18_X_TAILWINDCSS_VITE = '^4.1.4';\nexport const V18_X_POSTCSS = '^8.5.3';\nexport const V18_X_AUTOPREFIXER = '^10.4.0';\n\n// devDependencies\nexport const V18_X_ANALOG_JS_PLATFORM = '^3.0.0-alpha.12';\nexport const V18_X_ANGULAR_DEVKIT_BUILD_ANGULAR = '^19.0.0';\nexport const V18_X_NX_VITE = '^21.0.0';\nexport const V18_X_NX_LINTER = '^21.0.0';\nexport const V18_X_JSDOM = '^22.1.0';\nexport const V18_X_VITE = '^8.0.0';\nexport const V18_X_VITE_TSCONFIG_PATHS = '^4.2.0';\nexport const V18_X_VITEST = '^4.0.0';\nexport const V18_X_ZOD = '^3.21.4';\n"],"mappings":";AAeA,IAAa,oBAAoB;AACjC,IAAa,yBAAyB;AACtC,IAAa,gBAAgB"}
1
+ {"version":3,"file":"versions.js","names":[],"sources":["../../../../../../../../../../../packages/nx-plugin/src/generators/app/versions/nx_18_X/versions.ts"],"sourcesContent":["// V18_X\n// dependencies\nexport const V18_X_NX_DEVKIT = '^20.0.0';\nexport const V18_X_NX_ANGULAR = '^20.0.0';\nexport const V18_X_ANALOG_JS_CONTENT = '^3.0.0-alpha.14';\nexport const V18_X_ANALOG_JS_ROUTER = '^3.0.0-alpha.14';\nexport const V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^3.0.0-alpha.14';\nexport const V18_X_ANALOG_JS_VITEST_ANGULAR = '^3.0.0-alpha.14';\nexport const V18_X_FRONT_MATTER = '^4.0.2';\nexport const V18_X_MARKED = '^15.0.7';\nexport const V18_X_MARKED_GFM_HEADING_ID = '^4.1.1';\nexport const V18_X_MARKED_HIGHLIGHT = '^2.2.1';\nexport const V18_X_MARKED_MANGLE = '^1.1.10';\nexport const V18_X_MERMAID = '^10.2.4';\nexport const V18_X_PRISMJS = '^1.29.0';\nexport const V18_X_TAILWINDCSS = '^4.2.2';\nexport const V18_X_TAILWINDCSS_VITE = '^4.2.2';\n\n// devDependencies\nexport const V18_X_ANALOG_JS_PLATFORM = '^3.0.0-alpha.14';\nexport const V18_X_ANGULAR_DEVKIT_BUILD_ANGULAR = '^19.0.0';\nexport const V18_X_NX_VITE = '^21.0.0';\nexport const V18_X_NX_LINTER = '^21.0.0';\nexport const V18_X_JSDOM = '^22.1.0';\nexport const V18_X_VITE = '^8.0.0';\nexport const V18_X_VITE_TSCONFIG_PATHS = '^4.2.0';\nexport const V18_X_VITEST = '^4.0.0';\nexport const V18_X_ZOD = '^3.21.4';\n"],"mappings":";AAeA,IAAa,oBAAoB;AACjC,IAAa,yBAAyB"}
@@ -1,4 +1,4 @@
1
- declare const tailwindDependencyKeys: readonly ["postcss", "tailwindcss", "@tailwindcss/postcss"];
1
+ declare const tailwindDependencyKeys: readonly ["tailwindcss", "@tailwindcss/vite"];
2
2
  export type TailwindDependency = (typeof tailwindDependencyKeys)[number];
3
3
  export declare const getTailwindDependencies: () => Record<TailwindDependency, string>;
4
4
  export {};
@@ -2,9 +2,8 @@ const require_versions = require("./nx_18_X/versions.js");
2
2
  //#region packages/nx-plugin/src/generators/app/versions/tailwind-dependencies.ts
3
3
  var getTailwindDependencies = () => {
4
4
  return {
5
- postcss: require_versions.V18_X_POSTCSS,
6
5
  tailwindcss: require_versions.V18_X_TAILWINDCSS,
7
- "@tailwindcss/postcss": require_versions.V18_X_TAILWINDCSS_VITE
6
+ "@tailwindcss/vite": require_versions.V18_X_TAILWINDCSS_VITE
8
7
  };
9
8
  };
10
9
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"tailwind-dependencies.js","names":[],"sources":["../../../../../../../../../../packages/nx-plugin/src/generators/app/versions/tailwind-dependencies.ts"],"sourcesContent":["import {\n V18_X_POSTCSS,\n V18_X_TAILWINDCSS,\n V18_X_TAILWINDCSS_VITE,\n} from './nx_18_X/versions';\n\nconst tailwindDependencyKeys = [\n 'postcss',\n 'tailwindcss',\n '@tailwindcss/postcss',\n] as const;\n\nexport type TailwindDependency = (typeof tailwindDependencyKeys)[number];\n\nexport const getTailwindDependencies = (): Record<\n TailwindDependency,\n string\n> => {\n return {\n postcss: V18_X_POSTCSS,\n tailwindcss: V18_X_TAILWINDCSS,\n '@tailwindcss/postcss': V18_X_TAILWINDCSS_VITE,\n };\n};\n"],"mappings":";;AAcA,IAAa,gCAGR;AACH,QAAO;EACL,SAAS,iBAAA;EACT,aAAa,iBAAA;EACb,wBAAwB,iBAAA;EACzB"}
1
+ {"version":3,"file":"tailwind-dependencies.js","names":[],"sources":["../../../../../../../../../../packages/nx-plugin/src/generators/app/versions/tailwind-dependencies.ts"],"sourcesContent":["import { V18_X_TAILWINDCSS, V18_X_TAILWINDCSS_VITE } from './nx_18_X/versions';\n\nconst tailwindDependencyKeys = ['tailwindcss', '@tailwindcss/vite'] as const;\n\nexport type TailwindDependency = (typeof tailwindDependencyKeys)[number];\n\nexport const getTailwindDependencies = (): Record<\n TailwindDependency,\n string\n> => {\n return {\n tailwindcss: V18_X_TAILWINDCSS,\n '@tailwindcss/vite': V18_X_TAILWINDCSS_VITE,\n };\n};\n"],"mappings":";;AAMA,IAAa,gCAGR;AACH,QAAO;EACL,aAAa,iBAAA;EACb,qBAAqB,iBAAA;EACtB"}
@@ -102,6 +102,8 @@ import analog from '@analogjs/platform';
102
102
  import { defineConfig } from 'vite';
103
103
  import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
104
104
 
105
+ import tailwindcss from '@tailwindcss/vite';
106
+
105
107
  // https://vitejs.dev/config/
106
108
  export default defineConfig(({ mode }) => {
107
109
  return {
@@ -117,7 +119,7 @@ export default defineConfig(({ mode }) => {
117
119
  allow: ['.'],
118
120
  },
119
121
  },
120
- plugins: [analog(), nxViteTsPaths()],
122
+ plugins: [tailwindcss(), analog(), nxViteTsPaths()],
121
123
  test: {
122
124
  globals: true,
123
125
  environment: 'jsdom',
@@ -1,13 +1,13 @@
1
- export declare const V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.12";
2
- export declare const V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.12";
1
+ export declare const V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.14";
2
+ export declare const V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.14";
3
3
  export declare const V19_X_MARKED = "^15.0.7";
4
4
  export declare const V19_X_MARKED_GFM_HEADING_ID = "^4.1.1";
5
5
  export declare const V19_X_MARKED_HIGHLIGHT = "^2.2.1";
6
6
  export declare const V19_X_MARKED_MANGLE = "^1.1.10";
7
7
  export declare const V19_X_PRISMJS = "^1.29.0";
8
- export declare const V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.12";
9
- export declare const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.12";
10
- export declare const V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.12";
8
+ export declare const V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.14";
9
+ export declare const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.14";
10
+ export declare const V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.14";
11
11
  export declare const V19_X_NX_ANGULAR = "^22.0.0";
12
12
  export declare const V19_X_NX_VITE = "^22.0.0";
13
13
  export declare const V19_X_JSDOM = "^22.0.0";
@@ -1,14 +1,14 @@
1
1
  //#region packages/nx-plugin/src/utils/versions/ng_19_X/versions.ts
2
- var V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.12";
3
- var V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.12";
2
+ var V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.14";
3
+ var V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.14";
4
4
  var V19_X_MARKED = "^15.0.7";
5
5
  var V19_X_MARKED_GFM_HEADING_ID = "^4.1.1";
6
6
  var V19_X_MARKED_HIGHLIGHT = "^2.2.1";
7
7
  var V19_X_MARKED_MANGLE = "^1.1.10";
8
8
  var V19_X_PRISMJS = "^1.29.0";
9
- var V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.12";
10
- var V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.12";
11
- var V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.12";
9
+ var V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.14";
10
+ var V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.14";
11
+ var V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.14";
12
12
  var V19_X_NX_VITE = "^22.0.0";
13
13
  var V19_X_JSDOM = "^22.0.0";
14
14
  var V19_X_VITE_TSCONFIG_PATHS = "^4.2.0";
@@ -1 +1 @@
1
- {"version":3,"file":"versions.js","names":[],"sources":["../../../../../../../../../../packages/nx-plugin/src/utils/versions/ng_19_X/versions.ts"],"sourcesContent":["// V19_X\nexport const V19_X_ANALOG_JS_ROUTER = '^3.0.0-alpha.12';\nexport const V19_X_ANALOG_JS_CONTENT = '^3.0.0-alpha.12';\nexport const V19_X_MARKED = '^15.0.7';\nexport const V19_X_MARKED_GFM_HEADING_ID = '^4.1.1';\nexport const V19_X_MARKED_HIGHLIGHT = '^2.2.1';\nexport const V19_X_MARKED_MANGLE = '^1.1.10';\nexport const V19_X_PRISMJS = '^1.29.0';\n\n// devDependencies\nexport const V19_X_ANALOG_JS_PLATFORM = '^3.0.0-alpha.12';\nexport const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^3.0.0-alpha.12';\nexport const V19_X_ANALOG_JS_VITEST_ANGULAR = '^3.0.0-alpha.12';\nexport const V19_X_NX_ANGULAR = '^22.0.0';\nexport const V19_X_NX_VITE = '^22.0.0';\nexport const V19_X_JSDOM = '^22.0.0';\nexport const V19_X_VITE_TSCONFIG_PATHS = '^4.2.0';\nexport const V19_X_VITEST = '^3.0.0';\nexport const V19_X_VITE = '^6.0.0';\nexport const NX_X_LATEST_VITE = '^8.0.0';\nexport const NX_X_LATEST_VITEST = '^4.0.0';\n"],"mappings":";AACA,IAAa,yBAAyB;AACtC,IAAa,0BAA0B;AACvC,IAAa,eAAe;AAC5B,IAAa,8BAA8B;AAC3C,IAAa,yBAAyB;AACtC,IAAa,sBAAsB;AACnC,IAAa,gBAAgB;AAG7B,IAAa,2BAA2B;AACxC,IAAa,sCAAsC;AACnD,IAAa,iCAAiC;AAE9C,IAAa,gBAAgB;AAC7B,IAAa,cAAc;AAC3B,IAAa,4BAA4B;AACzC,IAAa,eAAe;AAC5B,IAAa,aAAa;AAC1B,IAAa,mBAAmB;AAChC,IAAa,qBAAqB"}
1
+ {"version":3,"file":"versions.js","names":[],"sources":["../../../../../../../../../../packages/nx-plugin/src/utils/versions/ng_19_X/versions.ts"],"sourcesContent":["// V19_X\nexport const V19_X_ANALOG_JS_ROUTER = '^3.0.0-alpha.14';\nexport const V19_X_ANALOG_JS_CONTENT = '^3.0.0-alpha.14';\nexport const V19_X_MARKED = '^15.0.7';\nexport const V19_X_MARKED_GFM_HEADING_ID = '^4.1.1';\nexport const V19_X_MARKED_HIGHLIGHT = '^2.2.1';\nexport const V19_X_MARKED_MANGLE = '^1.1.10';\nexport const V19_X_PRISMJS = '^1.29.0';\n\n// devDependencies\nexport const V19_X_ANALOG_JS_PLATFORM = '^3.0.0-alpha.14';\nexport const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^3.0.0-alpha.14';\nexport const V19_X_ANALOG_JS_VITEST_ANGULAR = '^3.0.0-alpha.14';\nexport const V19_X_NX_ANGULAR = '^22.0.0';\nexport const V19_X_NX_VITE = '^22.0.0';\nexport const V19_X_JSDOM = '^22.0.0';\nexport const V19_X_VITE_TSCONFIG_PATHS = '^4.2.0';\nexport const V19_X_VITEST = '^3.0.0';\nexport const V19_X_VITE = '^6.0.0';\nexport const NX_X_LATEST_VITE = '^8.0.0';\nexport const NX_X_LATEST_VITEST = '^4.0.0';\n"],"mappings":";AACA,IAAa,yBAAyB;AACtC,IAAa,0BAA0B;AACvC,IAAa,eAAe;AAC5B,IAAa,8BAA8B;AAC3C,IAAa,yBAAyB;AACtC,IAAa,sBAAsB;AACnC,IAAa,gBAAgB;AAG7B,IAAa,2BAA2B;AACxC,IAAa,sCAAsC;AACnD,IAAa,iCAAiC;AAE9C,IAAa,gBAAgB;AAC7B,IAAa,cAAc;AAC3B,IAAa,4BAA4B;AACzC,IAAa,eAAe;AAC5B,IAAa,aAAa;AAC1B,IAAa,mBAAmB;AAChC,IAAa,qBAAqB"}