create-analog 1.8.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 +33 -1
- package/package.json +1 -1
- package/template-angular-v16/package.json +5 -5
- package/template-angular-v17/package.json +5 -5
- package/template-blog/README.md +1 -1
- package/template-blog/index.html +1 -1
- package/template-blog/package.json +5 -5
- package/template-blog/src/app/app.component.ts +1 -1
- package/template-latest/README.md +1 -1
- package/template-latest/index.html +1 -1
- package/template-latest/package.json +5 -5
- package/template-latest/src/app/app.component.ts +1 -1
- package/template-minimal/README.md +1 -1
- package/template-minimal/index.html +1 -1
- package/template-minimal/src/app/app.component.ts +1 -1
package/index.js
CHANGED
|
@@ -221,13 +221,21 @@ async function init() {
|
|
|
221
221
|
ensureSyntaxHighlighter(root, pkg, highlighter);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
if (!skipTailwind)
|
|
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
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"test": "ng test"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@analogjs/content": "^1.
|
|
19
|
-
"@analogjs/router": "^1.
|
|
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.
|
|
42
|
-
"@analogjs/vite-plugin-angular": "^1.
|
|
43
|
-
"@analogjs/vitest-angular": "^1.
|
|
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.
|
|
19
|
-
"@analogjs/router": "^1.
|
|
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.
|
|
42
|
-
"@analogjs/vite-plugin-angular": "^1.
|
|
43
|
-
"@analogjs/vitest-angular": "^1.
|
|
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",
|
package/template-blog/README.md
CHANGED
package/template-blog/index.html
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
|
-
<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.
|
|
19
|
-
"@analogjs/router": "^1.
|
|
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.
|
|
40
|
-
"@analogjs/vite-plugin-angular": "^1.
|
|
41
|
-
"@analogjs/vitest-angular": "^1.
|
|
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",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
|
-
<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.
|
|
19
|
-
"@analogjs/router": "^1.
|
|
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.
|
|
42
|
-
"@analogjs/vite-plugin-angular": "^1.
|
|
43
|
-
"@analogjs/vitest-angular": "^1.
|
|
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",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
|
-
<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" />
|