asjs-express 1.4.1 → 1.5.0

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.
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  const fs = require('fs');
4
4
  const path = require('path');
@@ -96,6 +96,15 @@ function toDisplayName(value) {
96
96
  .join(' ') || 'ASJS App';
97
97
  }
98
98
 
99
+ function toInitials(displayName) {
100
+ return displayName
101
+ .split(' ')
102
+ .filter(Boolean)
103
+ .slice(0, 2)
104
+ .map((part) => part.charAt(0).toUpperCase())
105
+ .join('');
106
+ }
107
+
99
108
  function ensureTargetDirectory(targetDirectory, force) {
100
109
  if (!fs.existsSync(targetDirectory)) {
101
110
  fs.mkdirSync(targetDirectory, { recursive: true });
@@ -182,6 +191,7 @@ function main() {
182
191
 
183
192
  const variables = {
184
193
  APP_TITLE: displayName,
194
+ APP_INITIALS: toInitials(displayName),
185
195
  ASJS_VERSION: packageJson.version,
186
196
  EXPRESS_VERSION: expressVersion,
187
197
  PACKAGE_NAME: packageName,