@chill-sharp/create-app 1.1.12 → 1.1.15
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/README.md +12 -12
- package/package.json +36 -36
- package/template/.agents/skills/chillsharp-current-user-preferences/SKILL.md +70 -70
- package/template/.agents/skills/chillsharp-ui-template/SKILL.md +18 -18
- package/template/.editorconfig +11 -11
- package/template/.github/workflows/ci.yml +33 -33
- package/template/.github/workflows/deploy.yml +36 -36
- package/template/angular.json +131 -131
- package/template/doc/CurrentUserPreferences.md +106 -106
- package/template/doc/it/CurrentUserPreferences.md +106 -106
- package/template/gitignore +6 -6
- package/template/package.json +43 -43
- package/template/public/env.js +15 -15
- package/template/public/runtime-config.js +10 -10
- package/template/public/sw.js +8 -8
- package/template/src/app/app.component.spec.ts +15 -15
- package/template/src/app/app.component.ts +10 -10
- package/template/src/app/app.config.ts +22 -22
- package/template/src/app/app.routes.ts +14 -14
- package/template/src/app/core/overrides/README.md +12 -12
- package/template/src/app/core/overrides/register-client-overrides.ts +5 -5
- package/template/src/app/core/plugins/README.md +17 -17
- package/template/src/app/core/plugins/hello-plugin/README.md +25 -25
- package/template/src/app/core/plugins/hello-plugin/hello-plugin.component.ts +28 -28
- package/template/src/app/core/plugins/register-client-plugins.ts +16 -16
- package/template/src/app/core/providers/client-template.providers.ts +8 -8
- package/template/src/app/pages/client-home/client-home.component.ts +41 -41
- package/template/src/assets/branding/logo.svg +7 -7
- package/template/src/config/app-config.ts +17 -17
- package/template/src/config/runtime-config.ts +13 -13
- package/template/src/environments/environment.prod.ts +4 -4
- package/template/src/environments/environment.ts +4 -4
- package/template/src/index.html +22 -22
- package/template/src/main.ts +6 -6
- package/template/src/runtime-config.d.ts +10 -10
- package/template/src/styles.scss +116 -116
- package/template/tsconfig.app.json +13 -13
- package/template/tsconfig.json +33 -33
- package/template/tsconfig.spec.json +13 -13
- package/bin/create-chill-sharp-app.mjs +0 -60
package/template/tsconfig.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compileOnSave": false,
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "./dist/out-tsc",
|
|
5
|
-
"strict": true,
|
|
6
|
-
"noImplicitOverride": true,
|
|
7
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
8
|
-
"noImplicitReturns": true,
|
|
9
|
-
"noFallthroughCasesInSwitch": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"isolatedModules": true,
|
|
12
|
-
"esModuleInterop": true,
|
|
13
|
-
"experimentalDecorators": true,
|
|
14
|
-
"importHelpers": true,
|
|
15
|
-
"target": "ES2022",
|
|
16
|
-
"module": "preserve"
|
|
17
|
-
},
|
|
18
|
-
"angularCompilerOptions": {
|
|
19
|
-
"enableI18nLegacyMessageIdFormat": false,
|
|
20
|
-
"strictInjectionParameters": true,
|
|
21
|
-
"strictInputAccessModifiers": true,
|
|
22
|
-
"strictTemplates": true
|
|
23
|
-
},
|
|
24
|
-
"files": [],
|
|
25
|
-
"references": [
|
|
26
|
-
{
|
|
27
|
-
"path": "./tsconfig.app.json"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"path": "./tsconfig.spec.json"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./dist/out-tsc",
|
|
5
|
+
"strict": true,
|
|
6
|
+
"noImplicitOverride": true,
|
|
7
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
8
|
+
"noImplicitReturns": true,
|
|
9
|
+
"noFallthroughCasesInSwitch": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"experimentalDecorators": true,
|
|
14
|
+
"importHelpers": true,
|
|
15
|
+
"target": "ES2022",
|
|
16
|
+
"module": "preserve"
|
|
17
|
+
},
|
|
18
|
+
"angularCompilerOptions": {
|
|
19
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
20
|
+
"strictInjectionParameters": true,
|
|
21
|
+
"strictInputAccessModifiers": true,
|
|
22
|
+
"strictTemplates": true
|
|
23
|
+
},
|
|
24
|
+
"files": [],
|
|
25
|
+
"references": [
|
|
26
|
+
{
|
|
27
|
+
"path": "./tsconfig.app.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "./tsconfig.spec.json"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "./out-tsc/spec",
|
|
5
|
-
"types": [
|
|
6
|
-
"jasmine"
|
|
7
|
-
]
|
|
8
|
-
},
|
|
9
|
-
"include": [
|
|
10
|
-
"src/**/*.spec.ts",
|
|
11
|
-
"src/**/*.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./out-tsc/spec",
|
|
5
|
+
"types": [
|
|
6
|
+
"jasmine"
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"include": [
|
|
10
|
+
"src/**/*.spec.ts",
|
|
11
|
+
"src/**/*.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { copyFileSync, cpSync, existsSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
|
|
7
|
-
const packageDirectory = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
8
|
-
const templateDirectory = path.join(packageDirectory, 'template');
|
|
9
|
-
const packageManifest = JSON.parse(readFileSync(path.join(packageDirectory, 'package.json'), 'utf8'));
|
|
10
|
-
const [projectName] = process.argv.slice(2).filter((argument) => !argument.startsWith('-'));
|
|
11
|
-
|
|
12
|
-
if (!projectName || process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
13
|
-
printUsage();
|
|
14
|
-
process.exit(projectName ? 0 : 1);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if (!/^[a-z0-9][a-z0-9-]*$/.test(projectName)) {
|
|
18
|
-
console.error('Project names must use lowercase letters, digits, and hyphens only.');
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const destination = path.resolve(process.cwd(), projectName);
|
|
23
|
-
if (existsSync(destination)) {
|
|
24
|
-
console.error(`Cannot create '${projectName}': '${destination}' already exists.`);
|
|
25
|
-
process.exit(1);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
cpSync(templateDirectory, destination, { recursive: true });
|
|
29
|
-
|
|
30
|
-
const generatedManifestPath = path.join(destination, 'package.json');
|
|
31
|
-
const generatedManifest = JSON.parse(readFileSync(generatedManifestPath, 'utf8'));
|
|
32
|
-
generatedManifest.name = projectName;
|
|
33
|
-
generatedManifest.private = true;
|
|
34
|
-
generatedManifest.description = 'Angular application powered by ChillSharp UI.';
|
|
35
|
-
generatedManifest.dependencies = {
|
|
36
|
-
...generatedManifest.dependencies,
|
|
37
|
-
'@chill-sharp/ng-client': `^${packageManifest.version}`,
|
|
38
|
-
'@chill-sharp/ts-client': `^${packageManifest.version}`,
|
|
39
|
-
'@chill-sharp/ui-core': `^${packageManifest.version}`
|
|
40
|
-
};
|
|
41
|
-
writeFileSync(generatedManifestPath, `${JSON.stringify(generatedManifest, null, 2)}\n`);
|
|
42
|
-
|
|
43
|
-
rmSync(path.join(destination, 'package-lock.json'), { force: true });
|
|
44
|
-
rmSync(path.join(destination, 'upgrade.ps1'), { force: true });
|
|
45
|
-
rmSync(path.join(destination, 'upgrade.sh'), { force: true });
|
|
46
|
-
rmSync(path.join(destination, 'publish-to-shared-folder.ps1'), { force: true });
|
|
47
|
-
copyFileSync(path.join(destination, 'gitignore'), path.join(destination, '.gitignore'));
|
|
48
|
-
rmSync(path.join(destination, 'gitignore'), { force: true });
|
|
49
|
-
writeFileSync(path.join(destination, 'README.md'), `# ${projectName}\n\nAngular application shell powered by ChillSharp UI.\n\n## Get started\n\n\`\`\`bash\nnpm install\nnpm start\n\`\`\`\n\nThe application uses published ChillSharp packages from npm. Update the shared UI explicitly with:\n\n\`\`\`bash\nnpm install @chill-sharp/ui-core@latest\n\`\`\`\n\nConfigure the API and client URLs in \`public/env.js\` and \`public/runtime-config.js\`.\n`);
|
|
50
|
-
writeFileSync(path.join(destination, 'HOW_TO_BUILD.md'), `# Build ${projectName}\n\n\`\`\`bash\nnpm install\nnpm run build\n\`\`\`\n\nThe ChillSharp dependencies are restored from npm; no local package archives are required.\n`);
|
|
51
|
-
|
|
52
|
-
console.log(`Created ${projectName}.`);
|
|
53
|
-
console.log('Next steps:');
|
|
54
|
-
console.log(` cd ${projectName}`);
|
|
55
|
-
console.log(' npm install');
|
|
56
|
-
console.log(' npm start');
|
|
57
|
-
|
|
58
|
-
function printUsage() {
|
|
59
|
-
console.log('Usage: npm create @chill-sharp/app <project-name>');
|
|
60
|
-
}
|