@magmonium/cli 0.8.13 → 0.8.17
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/README.md +19 -22
- package/codegen/index.js +306 -62
- package/package.json +1 -1
- package/src/compilers/logo-compiler.d.ts +2 -0
- package/src/compilers/logo-compiler.d.ts.map +1 -1
- package/src/compilers/logo-compiler.js +50 -9
- package/src/compilers/logo-compiler.js.map +1 -1
- package/src/compilers/web-component/lib/config-data.d.ts.map +1 -1
- package/src/compilers/web-component/lib/config-data.js +4 -0
- package/src/compilers/web-component/lib/config-data.js.map +1 -1
- package/src/compilers/web-component/model/type.d.ts +2 -5
- package/src/compilers/web-component/model/type.d.ts.map +1 -1
- package/src/core/config.d.ts.map +1 -1
- package/src/core/config.js +3 -1
- package/src/core/config.js.map +1 -1
- package/src/utils/app-logo-svg.d.ts +11 -0
- package/src/utils/app-logo-svg.d.ts.map +1 -0
- package/src/utils/app-logo-svg.js +50 -0
- package/src/utils/app-logo-svg.js.map +1 -0
- package/src/utils/pwa-utils.d.ts +6 -0
- package/src/utils/pwa-utils.d.ts.map +1 -1
- package/src/utils/pwa-utils.js.map +1 -1
package/bin/README.md
CHANGED
|
@@ -94,7 +94,6 @@ npm run build:deploy # Create deployment zip
|
|
|
94
94
|
- `src/manifest.webmanifest` - PWA manifest
|
|
95
95
|
- `ngsw-config.json` - Service worker configuration
|
|
96
96
|
- `src/app/services/pwa.service.ts` - PWA functionality service
|
|
97
|
-
- `mag_assets/logo/source.svg` - App logo source (Magmonium logo)
|
|
98
97
|
- `create-deploy-zip.js` - Deployment packaging script
|
|
99
98
|
- `PWA-README.md` - Comprehensive PWA documentation
|
|
100
99
|
|
|
@@ -145,10 +144,7 @@ mag-cli assets --watch
|
|
|
145
144
|
# With custom path and watch mode
|
|
146
145
|
mag-cli assets -p my-app --watch
|
|
147
146
|
|
|
148
|
-
#
|
|
149
|
-
echo '<svg>...</svg>' > mag_assets/logo/source.svg
|
|
150
|
-
|
|
151
|
-
# Generate the app icon set
|
|
147
|
+
# Generate the app icon set (from the WebComponentConfig `pwa` snapshot)
|
|
152
148
|
mag-cli assets
|
|
153
149
|
|
|
154
150
|
# Icons are now available in assets/logo/
|
|
@@ -175,30 +171,31 @@ Interactive translation manager for finding and adding missing translations.
|
|
|
175
171
|
|
|
176
172
|
## App Logo Workflow
|
|
177
173
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
174
|
+
An app's AppLogo is its Store App's (nx ADR 0007): the LogoGlyph painted white
|
|
175
|
+
over App Color, set by the app's Owner in m-one-ui's App Identity panel. A
|
|
176
|
+
release copies a snapshot into the WebComponentConfig, and `mag-cli assets`
|
|
177
|
+
draws the icon set from it:
|
|
178
|
+
|
|
179
|
+
```yaml
|
|
180
|
+
# mag_assets/remote/<app>.yml — written by the release, never by hand
|
|
181
|
+
pwa:
|
|
182
|
+
name: 'Orders'
|
|
183
|
+
desc: 'Track every order'
|
|
184
|
+
color: '#3355aa'
|
|
185
|
+
bgcolor: '#3355aa'
|
|
186
|
+
glyph: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">…</svg>'
|
|
187
|
+
```
|
|
184
188
|
|
|
185
189
|
```bash
|
|
186
|
-
# Replace the default icon with your custom design
|
|
187
|
-
cat > mag_assets/logo/source.svg << 'EOF'
|
|
188
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
189
|
-
<circle cx="50" cy="50" r="40" fill="#1976d2"/>
|
|
190
|
-
<text x="50" y="55" text-anchor="middle" fill="white" font-size="20">M</text>
|
|
191
|
-
</svg>
|
|
192
|
-
EOF
|
|
193
|
-
|
|
194
|
-
# Generate the app icon set
|
|
195
190
|
mag-cli assets
|
|
196
|
-
|
|
197
|
-
# Verify icons were generated
|
|
198
191
|
ls assets/logo/
|
|
199
192
|
# icon.svg 192x192.png 512x512.png 180x180.png 32x32.png favicon.ico
|
|
200
193
|
```
|
|
201
194
|
|
|
195
|
+
Without a `glyph` the icons are a bare App Color tile. A host that is not a
|
|
196
|
+
Store App (m-ui) keeps a file-based logo: any SVG in `mag_assets/logo/` wins
|
|
197
|
+
over the snapshot.
|
|
198
|
+
|
|
202
199
|
## Modular Design Benefits
|
|
203
200
|
|
|
204
201
|
1. **Maintainability**: Each command is in its own module
|