asjs-express 1.4.0 → 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.
- package/bin/create-asjs-app.js +10 -0
- package/lib/client/asjs-theme.css +368 -318
- package/package.json +3 -3
- package/templates/minimal/app.js.tpl +107 -5
- package/templates/minimal/views/about.asjs.tpl +28 -0
- package/templates/minimal/views/contact.asjs.tpl +53 -0
- package/templates/minimal/views/home.asjs.tpl +31 -3
- package/templates/minimal/views/layouts/main.asjs.tpl +11 -5
package/bin/create-asjs-app.js
CHANGED
|
@@ -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,
|