create-analog 2.0.0-alpha.1 → 2.0.0-alpha.10

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/files/styles.css CHANGED
@@ -1,7 +1,4 @@
1
- /* Tailwind directives */
2
- @tailwind base;
3
- @tailwind components;
4
- @tailwind utilities;
1
+ @import 'tailwindcss';
5
2
 
6
3
  /* You can add global styles to this file, and also import other style files */
7
4
  :root {
package/index.js CHANGED
@@ -150,7 +150,7 @@ async function init() {
150
150
  onCancel: () => {
151
151
  throw new Error(red('✖') + ' Operation cancelled');
152
152
  },
153
- }
153
+ },
154
154
  );
155
155
  } catch (cancelled) {
156
156
  console.log(cancelled.message);
@@ -188,7 +188,7 @@ async function init() {
188
188
  const templateDir = path.resolve(
189
189
  fileURLToPath(import.meta.url),
190
190
  '..',
191
- `template-${template}`
191
+ `template-${template}`,
192
192
  );
193
193
 
194
194
  const filesDir = path.resolve(fileURLToPath(import.meta.url), '..', `files`);
@@ -211,15 +211,13 @@ async function init() {
211
211
  }
212
212
 
213
213
  if (!skipTailwind) {
214
- addTailwindConfig(write, filesDir);
215
- addPostCssConfig(write, filesDir);
216
214
  addTailwindDirectives(write, filesDir);
217
215
  }
218
216
 
219
217
  const pkgInfo = pkgFromUserAgent(process.env.npm_config_user_agent);
220
218
  const pkgManager = pkgInfo ? pkgInfo.name : 'npm';
221
219
  const pkg = JSON.parse(
222
- fs.readFileSync(path.join(templateDir, `package.json`), 'utf-8')
220
+ fs.readFileSync(path.join(templateDir, `package.json`), 'utf-8'),
223
221
  );
224
222
 
225
223
  pkg.name = packageName || getProjectName();
@@ -230,7 +228,7 @@ async function init() {
230
228
  }
231
229
 
232
230
  if (!skipTailwind) {
233
- addTailwindDevDependencies(pkg);
231
+ addTailwindDependencies(pkg);
234
232
  }
235
233
 
236
234
  if (pkgManager === 'yarn') {
@@ -284,7 +282,7 @@ function copy(src, dest) {
284
282
  */
285
283
  function isValidPackageName(projectName) {
286
284
  return /^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(
287
- projectName
285
+ projectName,
288
286
  );
289
287
  }
290
288
 
@@ -366,31 +364,14 @@ function getStartCommand(pkgManager) {
366
364
  function addTailwindDirectives(write, filesDir) {
367
365
  write(
368
366
  'src/styles.css',
369
- fs.readFileSync(path.join(filesDir, `styles.css`), 'utf-8')
370
- );
371
- }
372
-
373
- function addPostCssConfig(write, filesDir) {
374
- write(
375
- 'postcss.config.cjs',
376
- fs.readFileSync(path.join(filesDir, `postcss.config.cjs`), 'utf-8')
367
+ fs.readFileSync(path.join(filesDir, `styles.css`), 'utf-8'),
377
368
  );
378
369
  }
379
370
 
380
- function addTailwindConfig(write, filesDir) {
381
- write(
382
- 'tailwind.config.ts',
383
- fs.readFileSync(path.join(filesDir, `tailwind.config.ts`), 'utf-8')
384
- );
385
- }
386
-
387
- function addTailwindDevDependencies(pkg) {
388
- ['tailwindcss@^3.3.1', 'postcss@^8.4.21', 'autoprefixer@^10.4.14'].forEach(
389
- (packageName) => {
390
- const [name, version] = packageName.split('@');
391
- pkg.devDependencies[name] = version;
392
- }
393
- );
371
+ function addTailwindDependencies(pkg) {
372
+ pkg.dependencies['tailwindcss'] = '^4.1.4';
373
+ pkg.dependencies['postcss'] = '^8.5.3';
374
+ pkg.dependencies['@tailwindcss/vite'] = '^4.1.4';
394
375
  }
395
376
 
396
377
  function addYarnDevDependencies(pkg, template) {
@@ -472,7 +453,7 @@ function setComponentFormat(root, filesDir, write, template, useAnalogSFC) {
472
453
  if (useAnalogSFC) {
473
454
  write(
474
455
  'src/analog-env.d.ts',
475
- fs.readFileSync(path.join(filesDir, 'analog-env.d.ts'), 'utf-8')
456
+ fs.readFileSync(path.join(filesDir, 'analog-env.d.ts'), 'utf-8'),
476
457
  );
477
458
  }
478
459
  }
@@ -484,7 +465,7 @@ function replacePlaceholders(root, files, config) {
484
465
  const newFileContent = Object.keys(config).reduce(
485
466
  (content, placeholder) =>
486
467
  content.replace(RegExp(placeholder, 'g'), config[placeholder]),
487
- fileContent
468
+ fileContent,
488
469
  );
489
470
  fs.writeFileSync(filePath, newFileContent);
490
471
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-analog",
3
- "version": "2.0.0-alpha.1",
3
+ "version": "2.0.0-alpha.10",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Brandon Roberts",
@@ -15,8 +15,8 @@
15
15
  "test": "ng test"
16
16
  },
17
17
  "dependencies": {
18
- "@analogjs/content": "^2.0.0-alpha.1",
19
- "@analogjs/router": "^2.0.0-alpha.1",
18
+ "@analogjs/content": "^2.0.0-alpha.10",
19
+ "@analogjs/router": "^2.0.0-alpha.10",
20
20
  "@angular/animations": "^16.2.0",
21
21
  "@angular/common": "^16.2.0",
22
22
  "@angular/compiler": "^16.2.0",
@@ -28,9 +28,9 @@
28
28
  "@angular/router": "^16.2.0",
29
29
  "@nx/angular": "~18.0.0",
30
30
  "front-matter": "^4.0.2",
31
- "marked": "^5.0.2",
32
- "marked-gfm-heading-id": "^3.1.0",
33
- "marked-highlight": "^2.0.1",
31
+ "marked": "^15.0.7",
32
+ "marked-gfm-heading-id": "^4.1.1",
33
+ "marked-highlight": "^2.2.1",
34
34
  "mermaid": "^10.2.4",
35
35
  "prismjs": "^1.29.0",
36
36
  "rxjs": "~7.5.6",
@@ -38,9 +38,9 @@
38
38
  "zone.js": "~0.13.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@analogjs/platform": "^2.0.0-alpha.1",
42
- "@analogjs/vite-plugin-angular": "^2.0.0-alpha.1",
43
- "@analogjs/vitest-angular": "^2.0.0-alpha.1",
41
+ "@analogjs/platform": "^2.0.0-alpha.10",
42
+ "@analogjs/vite-plugin-angular": "^2.0.0-alpha.10",
43
+ "@analogjs/vitest-angular": "^2.0.0-alpha.10",
44
44
  "@angular-devkit/build-angular": "^16.2.0",
45
45
  "@angular/cli": "^16.2.0",
46
46
  "@angular/compiler-cli": "^16.2.0",
@@ -15,8 +15,8 @@
15
15
  "test": "ng test"
16
16
  },
17
17
  "dependencies": {
18
- "@analogjs/content": "^2.0.0-alpha.1",
19
- "@analogjs/router": "^2.0.0-alpha.1",
18
+ "@analogjs/content": "^2.0.0-alpha.10",
19
+ "@analogjs/router": "^2.0.0-alpha.10",
20
20
  "@angular/animations": "^17.2.0",
21
21
  "@angular/common": "^17.2.0",
22
22
  "@angular/compiler": "^17.2.0",
@@ -28,9 +28,9 @@
28
28
  "@angular/router": "^17.2.0",
29
29
  "@nx/angular": "~18.0.0",
30
30
  "front-matter": "^4.0.2",
31
- "marked": "^5.0.2",
32
- "marked-gfm-heading-id": "^3.1.0",
33
- "marked-highlight": "^2.0.1",
31
+ "marked": "^15.0.7",
32
+ "marked-gfm-heading-id": "^4.1.1",
33
+ "marked-highlight": "^2.2.1",
34
34
  "mermaid": "^10.2.4",
35
35
  "prismjs": "^1.29.0",
36
36
  "rxjs": "~7.5.6",
@@ -38,9 +38,9 @@
38
38
  "zone.js": "~0.14.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@analogjs/platform": "^2.0.0-alpha.1",
42
- "@analogjs/vite-plugin-angular": "^2.0.0-alpha.1",
43
- "@analogjs/vitest-angular": "^2.0.0-alpha.1",
41
+ "@analogjs/platform": "^2.0.0-alpha.10",
42
+ "@analogjs/vite-plugin-angular": "^2.0.0-alpha.10",
43
+ "@analogjs/vitest-angular": "^2.0.0-alpha.10",
44
44
  "@angular-devkit/build-angular": "^17.2.0",
45
45
  "@angular/cli": "^17.2.0",
46
46
  "@angular/compiler-cli": "^17.2.0",
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "private": true,
17
17
  "dependencies": {
18
- "@analogjs/content": "^2.0.0-alpha.1",
19
- "@analogjs/router": "^2.0.0-alpha.1",
18
+ "@analogjs/content": "^2.0.0-alpha.10",
19
+ "@analogjs/router": "^2.0.0-alpha.10",
20
20
  "@angular/animations": "^18.0.0",
21
21
  "@angular/build": "^18.0.0",
22
22
  "@angular/common": "^18.0.0",
@@ -28,19 +28,19 @@
28
28
  "@angular/platform-server": "^18.0.0",
29
29
  "@angular/router": "^18.0.0",
30
30
  "front-matter": "^4.0.2",
31
- "marked": "^5.0.2",
32
- "marked-gfm-heading-id": "^3.1.0",
33
- "marked-highlight": "^2.0.1",
34
- "marked-mangle": "^1.1.7",
31
+ "marked": "^15.0.7",
32
+ "marked-gfm-heading-id": "^4.1.1",
33
+ "marked-highlight": "^2.2.1",
34
+ "marked-mangle": "^1.1.10",
35
35
  "prismjs": "^1.29.0",
36
36
  "rxjs": "~7.8.0",
37
37
  "tslib": "^2.3.0",
38
38
  "zone.js": "~0.14.3"
39
39
  },
40
40
  "devDependencies": {
41
- "@analogjs/platform": "^2.0.0-alpha.1",
42
- "@analogjs/vite-plugin-angular": "^2.0.0-alpha.1",
43
- "@analogjs/vitest-angular": "^2.0.0-alpha.1",
41
+ "@analogjs/platform": "^2.0.0-alpha.10",
42
+ "@analogjs/vite-plugin-angular": "^2.0.0-alpha.10",
43
+ "@analogjs/vitest-angular": "^2.0.0-alpha.10",
44
44
  "@angular/cli": "^18.0.0",
45
45
  "@angular/compiler-cli": "^18.0.0",
46
46
  "jsdom": "^22.0.0",
@@ -5,7 +5,7 @@
5
5
  "projects": {
6
6
  "blog": {
7
7
  "projectType": "application",
8
- "root": "",
8
+ "root": ".",
9
9
  "sourceRoot": "src",
10
10
  "prefix": "blog",
11
11
  "architect": {
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "private": true,
17
17
  "dependencies": {
18
- "@analogjs/content": "^2.0.0-alpha.1",
19
- "@analogjs/router": "^2.0.0-alpha.1",
18
+ "@analogjs/content": "^2.0.0-alpha.10",
19
+ "@analogjs/router": "^2.0.0-alpha.10",
20
20
  "@angular/animations": "^19.0.0",
21
21
  "@angular/common": "^19.0.0",
22
22
  "@angular/compiler": "^19.0.0",
@@ -27,26 +27,26 @@
27
27
  "@angular/platform-server": "^19.0.0",
28
28
  "@angular/router": "^19.0.0",
29
29
  "front-matter": "^4.0.2",
30
- "marked": "^5.0.2",
31
- "marked-gfm-heading-id": "^3.1.0",
32
- "marked-highlight": "^2.0.1",
33
- "marked-mangle": "^1.1.7",
30
+ "marked": "^15.0.7",
31
+ "marked-gfm-heading-id": "^4.1.1",
32
+ "marked-highlight": "^2.2.1",
33
+ "marked-mangle": "^1.1.10",
34
34
  "rxjs": "~7.8.0",
35
35
  "tslib": "^2.3.0",
36
36
  "zone.js": "~0.15.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@analogjs/platform": "^2.0.0-alpha.1",
40
- "@analogjs/vite-plugin-angular": "^2.0.0-alpha.1",
41
- "@analogjs/vitest-angular": "^2.0.0-alpha.1",
39
+ "@analogjs/platform": "^2.0.0-alpha.10",
40
+ "@analogjs/vite-plugin-angular": "^2.0.0-alpha.10",
41
+ "@analogjs/vitest-angular": "^2.0.0-alpha.10",
42
42
  "@angular-devkit/build-angular": "^19.0.0",
43
43
  "@angular/build": "^19.0.0",
44
44
  "@angular/cli": "^19.0.0",
45
45
  "@angular/compiler-cli": "^19.0.0",
46
46
  "jsdom": "^22.0.0",
47
- "typescript": "~5.5.0",
47
+ "typescript": "~5.8.0",
48
48
  "vite": "^6.0.0",
49
49
  "vite-tsconfig-paths": "^4.2.0",
50
- "vitest": "^2.0.0"
50
+ "vitest": "^3.0.0"
51
51
  }
52
52
  }
@@ -1,32 +1,8 @@
1
1
  import 'zone.js/node';
2
2
  import '@angular/platform-server/init';
3
- import { enableProdMode } from '@angular/core';
4
- import { bootstrapApplication } from '@angular/platform-browser';
5
- import { renderApplication } from '@angular/platform-server';
6
- import { provideServerContext } from '@analogjs/router/server';
7
- import { ServerContext } from '@analogjs/router/tokens';
3
+ import { render } from '@analogjs/router/server';
8
4
 
9
5
  __APP_COMPONENT_IMPORT__
10
6
  import { config } from './app/app.config.server';
11
7
 
12
- if (import.meta.env.PROD) {
13
- enableProdMode();
14
- }
15
-
16
- export function bootstrap() {
17
- return bootstrapApplication(__APP_COMPONENT__, config);
18
- }
19
-
20
- export default async function render(
21
- url: string,
22
- document: string,
23
- serverContext: ServerContext
24
- ) {
25
- const html = await renderApplication(bootstrap, {
26
- document,
27
- url,
28
- platformProviders: [provideServerContext(serverContext)],
29
- });
30
-
31
- return html;
32
- }
8
+ export default render(__APP_COMPONENT__, config);
@@ -14,7 +14,7 @@
14
14
  "declaration": false,
15
15
  "downlevelIteration": true,
16
16
  "experimentalDecorators": true,
17
- "moduleResolution": "node",
17
+ "moduleResolution": "bundler",
18
18
  "isolatedModules": true,
19
19
  "importHelpers": true,
20
20
  "target": "ES2022",
@@ -5,7 +5,7 @@
5
5
  "projects": {
6
6
  "my-app": {
7
7
  "projectType": "application",
8
- "root": "",
8
+ "root": ".",
9
9
  "sourceRoot": "src",
10
10
  "prefix": "app",
11
11
  "architect": {
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "private": true,
17
17
  "dependencies": {
18
- "@analogjs/content": "^2.0.0-alpha.1",
19
- "@analogjs/router": "^2.0.0-alpha.1",
18
+ "@analogjs/content": "^2.0.0-alpha.10",
19
+ "@analogjs/router": "^2.0.0-alpha.10",
20
20
  "@angular/animations": "^19.0.0",
21
21
  "@angular/common": "^19.0.0",
22
22
  "@angular/compiler": "^19.0.0",
@@ -27,27 +27,27 @@
27
27
  "@angular/platform-server": "^19.0.0",
28
28
  "@angular/router": "^19.0.0",
29
29
  "front-matter": "^4.0.2",
30
- "marked": "^5.0.2",
31
- "marked-gfm-heading-id": "^3.1.0",
32
- "marked-highlight": "^2.0.1",
33
- "marked-mangle": "^1.1.7",
30
+ "marked": "^15.0.7",
31
+ "marked-gfm-heading-id": "^4.1.1",
32
+ "marked-highlight": "^2.2.1",
33
+ "marked-mangle": "^1.1.10",
34
34
  "prismjs": "^1.29.0",
35
35
  "rxjs": "~7.8.0",
36
36
  "tslib": "^2.3.0",
37
37
  "zone.js": "~0.15.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@analogjs/platform": "^2.0.0-alpha.1",
41
- "@analogjs/vite-plugin-angular": "^2.0.0-alpha.1",
42
- "@analogjs/vitest-angular": "^2.0.0-alpha.1",
40
+ "@analogjs/platform": "^2.0.0-alpha.10",
41
+ "@analogjs/vite-plugin-angular": "^2.0.0-alpha.10",
42
+ "@analogjs/vitest-angular": "^2.0.0-alpha.10",
43
43
  "@angular-devkit/build-angular": "^19.0.0",
44
44
  "@angular/build": "^19.0.0",
45
45
  "@angular/cli": "^19.0.0",
46
46
  "@angular/compiler-cli": "^19.0.0",
47
47
  "jsdom": "^22.0.0",
48
- "typescript": "~5.5.0",
48
+ "typescript": "~5.8.0",
49
49
  "vite": "^6.0.0",
50
50
  "vite-tsconfig-paths": "^4.2.0",
51
- "vitest": "^2.0.0"
51
+ "vitest": "^3.0.0"
52
52
  }
53
53
  }
@@ -1,32 +1,8 @@
1
1
  import 'zone.js/node';
2
2
  import '@angular/platform-server/init';
3
- import { enableProdMode } from '@angular/core';
4
- import { bootstrapApplication } from '@angular/platform-browser';
5
- import { renderApplication } from '@angular/platform-server';
6
- import { provideServerContext } from '@analogjs/router/server';
7
- import { ServerContext } from '@analogjs/router/tokens';
3
+ import { render } from '@analogjs/router/server';
8
4
 
9
5
  __APP_COMPONENT_IMPORT__
10
6
  import { config } from './app/app.config.server';
11
7
 
12
- if (import.meta.env.PROD) {
13
- enableProdMode();
14
- }
15
-
16
- export function bootstrap() {
17
- return bootstrapApplication(__APP_COMPONENT__, config);
18
- }
19
-
20
- export default async function render(
21
- url: string,
22
- document: string,
23
- serverContext: ServerContext
24
- ) {
25
- const html = await renderApplication(bootstrap, {
26
- document,
27
- url,
28
- platformProviders: [provideServerContext(serverContext)],
29
- });
30
-
31
- return html;
32
- }
8
+ export default render(__APP_COMPONENT__, config);
@@ -14,7 +14,7 @@
14
14
  "declaration": false,
15
15
  "downlevelIteration": true,
16
16
  "experimentalDecorators": true,
17
- "moduleResolution": "node",
17
+ "moduleResolution": "bundler",
18
18
  "isolatedModules": true,
19
19
  "importHelpers": true,
20
20
  "target": "ES2022",
@@ -5,7 +5,7 @@
5
5
  "projects": {
6
6
  "my-app": {
7
7
  "projectType": "application",
8
- "root": "",
8
+ "root": ".",
9
9
  "sourceRoot": "src",
10
10
  "prefix": "app",
11
11
  "architect": {
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "private": true,
17
17
  "dependencies": {
18
- "@analogjs/content": "^2.0.0-alpha.1",
19
- "@analogjs/router": "^2.0.0-alpha.1",
18
+ "@analogjs/content": "^2.0.0-alpha.10",
19
+ "@analogjs/router": "^2.0.0-alpha.10",
20
20
  "@angular/animations": "^19.0.0",
21
21
  "@angular/common": "^19.0.0",
22
22
  "@angular/compiler": "^19.0.0",
@@ -27,27 +27,27 @@
27
27
  "@angular/platform-server": "^19.0.0",
28
28
  "@angular/router": "^19.0.0",
29
29
  "front-matter": "^4.0.2",
30
- "marked": "^5.0.2",
31
- "marked-gfm-heading-id": "^3.1.0",
32
- "marked-highlight": "^2.0.1",
33
- "marked-mangle": "^1.1.7",
30
+ "marked": "^15.0.7",
31
+ "marked-gfm-heading-id": "^4.1.1",
32
+ "marked-highlight": "^2.2.1",
33
+ "marked-mangle": "^1.1.10",
34
34
  "prismjs": "^1.29.0",
35
35
  "rxjs": "~7.8.0",
36
36
  "tslib": "^2.3.0",
37
37
  "zone.js": "~0.15.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@analogjs/platform": "^2.0.0-alpha.1",
41
- "@analogjs/vite-plugin-angular": "^2.0.0-alpha.1",
42
- "@analogjs/vitest-angular": "^2.0.0-alpha.1",
40
+ "@analogjs/platform": "^2.0.0-alpha.10",
41
+ "@analogjs/vite-plugin-angular": "^2.0.0-alpha.10",
42
+ "@analogjs/vitest-angular": "^2.0.0-alpha.10",
43
43
  "@angular-devkit/build-angular": "^19.0.0",
44
44
  "@angular/build": "^19.0.0",
45
45
  "@angular/cli": "^19.0.0",
46
46
  "@angular/compiler-cli": "^19.0.0",
47
47
  "jsdom": "^22.0.0",
48
- "typescript": "~5.5.0",
48
+ "typescript": "~5.8.0",
49
49
  "vite": "^6.0.0",
50
50
  "vite-tsconfig-paths": "^4.2.0",
51
- "vitest": "^2.0.0"
51
+ "vitest": "^3.0.0"
52
52
  }
53
53
  }
@@ -1,32 +1,8 @@
1
1
  import 'zone.js/node';
2
2
  import '@angular/platform-server/init';
3
- import { enableProdMode } from '@angular/core';
4
- import { bootstrapApplication } from '@angular/platform-browser';
5
- import { renderApplication } from '@angular/platform-server';
6
- import { provideServerContext } from '@analogjs/router/server';
7
- import { ServerContext } from '@analogjs/router/tokens';
3
+ import { render } from '@analogjs/router/server';
8
4
 
9
5
  __APP_COMPONENT_IMPORT__
10
6
  import { config } from './app/app.config.server';
11
7
 
12
- if (import.meta.env.PROD) {
13
- enableProdMode();
14
- }
15
-
16
- export function bootstrap() {
17
- return bootstrapApplication(__APP_COMPONENT__, config);
18
- }
19
-
20
- export default async function render(
21
- url: string,
22
- document: string,
23
- serverContext: ServerContext
24
- ) {
25
- const html = await renderApplication(bootstrap, {
26
- document,
27
- url,
28
- platformProviders: [provideServerContext(serverContext)],
29
- });
30
-
31
- return html;
32
- }
8
+ export default render(__APP_COMPONENT__, config);
@@ -14,7 +14,7 @@
14
14
  "declaration": false,
15
15
  "downlevelIteration": true,
16
16
  "experimentalDecorators": true,
17
- "moduleResolution": "node",
17
+ "moduleResolution": "bundler",
18
18
  "isolatedModules": true,
19
19
  "importHelpers": true,
20
20
  "target": "ES2022",
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
5
- },
6
- };
@@ -1,9 +0,0 @@
1
- import type { Config } from 'tailwindcss';
2
-
3
- export default {
4
- content: ['./index.html', './src/**/*.{html,ts,md,analog,ag}'],
5
- theme: {
6
- extend: {},
7
- },
8
- plugins: [],
9
- } satisfies Config;