create-analog 1.8.2-beta.2 → 1.9.0-beta.1

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/index.js CHANGED
@@ -221,13 +221,21 @@ async function init() {
221
221
  ensureSyntaxHighlighter(root, pkg, highlighter);
222
222
  }
223
223
 
224
- if (!skipTailwind) addTailwindDevDependencies(pkg);
224
+ if (!skipTailwind) {
225
+ addTailwindDevDependencies(pkg);
226
+ }
227
+
225
228
  if (pkgManager === 'yarn') {
226
229
  addYarnDevDependencies(pkg, template);
227
230
  }
228
231
 
232
+ pkg.dependencies = sortObjectKeys(pkg.dependencies);
233
+ pkg.devDependencies = sortObjectKeys(pkg.devDependencies);
234
+
229
235
  write('package.json', JSON.stringify(pkg, null, 2));
230
236
 
237
+ setProjectTitle(root, getProjectName());
238
+
231
239
  console.log(`\nInitializing git repository:`);
232
240
  execSync(`git init ${targetDir} && cd ${targetDir} && git add .`);
233
241
 
@@ -416,6 +424,30 @@ function ensureSyntaxHighlighter(root, pkg, highlighter) {
416
424
  );
417
425
  }
418
426
 
427
+ function sortObjectKeys(obj) {
428
+ return Object.keys(obj)
429
+ .sort()
430
+ .reduce((result, key) => {
431
+ result[key] = obj[key];
432
+ return result;
433
+ }, {});
434
+ }
435
+
436
+ function setProjectTitle(root, title) {
437
+ const filePaths = [
438
+ path.join(root, 'index.html'),
439
+ path.join(root, 'README.md'),
440
+ ];
441
+
442
+ for (const filePath of filePaths) {
443
+ const fileContent = fs.readFileSync(filePath, 'utf-8');
444
+ fs.writeFileSync(
445
+ filePath,
446
+ fileContent.replace(/__PROJECT_TITLE__/g, title)
447
+ );
448
+ }
449
+ }
450
+
419
451
  init().catch((e) => {
420
452
  console.error(e);
421
453
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-analog",
3
- "version": "1.8.2-beta.2",
3
+ "version": "1.9.0-beta.1",
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": "^1.8.2-beta.2",
19
- "@analogjs/router": "^1.8.2-beta.2",
18
+ "@analogjs/content": "^1.9.0-beta.1",
19
+ "@analogjs/router": "^1.9.0-beta.1",
20
20
  "@angular/animations": "^16.2.0",
21
21
  "@angular/common": "^16.2.0",
22
22
  "@angular/compiler": "^16.2.0",
@@ -38,9 +38,9 @@
38
38
  "zone.js": "~0.13.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@analogjs/platform": "^1.8.2-beta.2",
42
- "@analogjs/vite-plugin-angular": "^1.8.2-beta.2",
43
- "@analogjs/vitest-angular": "^1.8.2-beta.2",
41
+ "@analogjs/platform": "^1.9.0-beta.1",
42
+ "@analogjs/vite-plugin-angular": "^1.9.0-beta.1",
43
+ "@analogjs/vitest-angular": "^1.9.0-beta.1",
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": "^1.8.2-beta.2",
19
- "@analogjs/router": "^1.8.2-beta.2",
18
+ "@analogjs/content": "^1.9.0-beta.1",
19
+ "@analogjs/router": "^1.9.0-beta.1",
20
20
  "@angular/animations": "^17.2.0",
21
21
  "@angular/common": "^17.2.0",
22
22
  "@angular/compiler": "^17.2.0",
@@ -38,9 +38,9 @@
38
38
  "zone.js": "~0.14.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@analogjs/platform": "^1.8.2-beta.2",
42
- "@analogjs/vite-plugin-angular": "^1.8.2-beta.2",
43
- "@analogjs/vitest-angular": "^1.8.2-beta.2",
41
+ "@analogjs/platform": "^1.9.0-beta.1",
42
+ "@analogjs/vite-plugin-angular": "^1.9.0-beta.1",
43
+ "@analogjs/vitest-angular": "^1.9.0-beta.1",
44
44
  "@angular-devkit/build-angular": "^17.2.0",
45
45
  "@angular/cli": "^17.2.0",
46
46
  "@angular/compiler-cli": "^17.2.0",
@@ -1,4 +1,4 @@
1
- # Analog App
1
+ # __PROJECT_TITLE__
2
2
 
3
3
  This project was generated with [Analog](https://analogjs.org), the fullstack meta-framework for Angular.
4
4
 
@@ -2,7 +2,7 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <title>My Blog</title>
5
+ <title>__PROJECT_TITLE__</title>
6
6
  <base href="/" />
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1" />
8
8
  <link rel="icon" type="image/x-icon" href="/favicon.ico" />
@@ -15,8 +15,8 @@
15
15
  "test": "ng test"
16
16
  },
17
17
  "dependencies": {
18
- "@analogjs/content": "^1.8.2-beta.2",
19
- "@analogjs/router": "^1.8.2-beta.2",
18
+ "@analogjs/content": "^1.9.0-beta.1",
19
+ "@analogjs/router": "^1.9.0-beta.1",
20
20
  "@angular/animations": "^18.0.0",
21
21
  "@angular/build": "^18.0.0",
22
22
  "@angular/common": "^18.0.0",
@@ -36,9 +36,9 @@
36
36
  "zone.js": "~0.14.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@analogjs/platform": "^1.8.2-beta.2",
40
- "@analogjs/vite-plugin-angular": "^1.8.2-beta.2",
41
- "@analogjs/vitest-angular": "^1.8.2-beta.2",
39
+ "@analogjs/platform": "^1.9.0-beta.1",
40
+ "@analogjs/vite-plugin-angular": "^1.9.0-beta.1",
41
+ "@analogjs/vitest-angular": "^1.9.0-beta.1",
42
42
  "@angular/cli": "^18.0.0",
43
43
  "@angular/compiler-cli": "^18.0.0",
44
44
  "jsdom": "^22.1.0",
@@ -9,7 +9,7 @@ import { RouterOutlet } from '@angular/router';
9
9
  <nav>
10
10
  <a href="/">Home</a>
11
11
  </nav>
12
- <router-outlet></router-outlet>
12
+ <router-outlet />
13
13
  `,
14
14
  styles: [
15
15
  `
@@ -1,4 +1,4 @@
1
- # Analog App
1
+ # __PROJECT_TITLE__
2
2
 
3
3
  This project was generated with [Analog](https://analogjs.org), the fullstack meta-framework for Angular.
4
4
 
@@ -2,7 +2,7 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <title>My App</title>
5
+ <title>__PROJECT_TITLE__</title>
6
6
  <base href="/" />
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1" />
8
8
  <link rel="icon" type="image/x-icon" href="/favicon.ico" />
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "private": true,
17
17
  "dependencies": {
18
- "@analogjs/content": "^1.8.2-beta.2",
19
- "@analogjs/router": "^1.8.2-beta.2",
18
+ "@analogjs/content": "^1.9.0-beta.1",
19
+ "@analogjs/router": "^1.9.0-beta.1",
20
20
  "@angular/animations": "^18.0.0",
21
21
  "@angular/build": "^18.0.0",
22
22
  "@angular/common": "^18.0.0",
@@ -38,9 +38,9 @@
38
38
  "zone.js": "~0.14.3"
39
39
  },
40
40
  "devDependencies": {
41
- "@analogjs/platform": "^1.8.2-beta.2",
42
- "@analogjs/vite-plugin-angular": "^1.8.2-beta.2",
43
- "@analogjs/vitest-angular": "^1.8.2-beta.2",
41
+ "@analogjs/platform": "^1.9.0-beta.1",
42
+ "@analogjs/vite-plugin-angular": "^1.9.0-beta.1",
43
+ "@analogjs/vitest-angular": "^1.9.0-beta.1",
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 @@ import { RouterOutlet } from '@angular/router';
5
5
  selector: 'app-root',
6
6
  standalone: true,
7
7
  imports: [RouterOutlet],
8
- template: ` <router-outlet></router-outlet> `,
8
+ template: `<router-outlet />`,
9
9
  styles: [
10
10
  `
11
11
  :host {
@@ -1,4 +1,4 @@
1
- # Analog App
1
+ # __PROJECT_TITLE__
2
2
 
3
3
  This project was generated with [Analog](https://analogjs.org), the fullstack meta-framework for Angular.
4
4
 
@@ -2,7 +2,7 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <title>My App</title>
5
+ <title>__PROJECT_TITLE__</title>
6
6
  <base href="/" />
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1" />
8
8
  <link rel="icon" type="image/x-icon" href="/favicon.ico" />
@@ -5,6 +5,6 @@ import { RouterOutlet } from '@angular/router';
5
5
  selector: 'app-root',
6
6
  standalone: true,
7
7
  imports: [RouterOutlet],
8
- template: `<router-outlet></router-outlet>`,
8
+ template: `<router-outlet />`,
9
9
  })
10
10
  export class AppComponent {}