@julien-lin/universal-pwa-cli 1.3.15 → 1.3.16
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.fr.md +16 -28
- package/README.md +18 -30
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.fr.md
CHANGED
|
@@ -17,19 +17,7 @@ Cette commande va :
|
|
|
17
17
|
- Générer tous les assets PWA (icônes, manifest, service worker)
|
|
18
18
|
- Injecter les meta tags dans vos fichiers HTML
|
|
19
19
|
|
|
20
|
-
Aucune installation globale
|
|
21
|
-
|
|
22
|
-
## Installation
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
npm install -g @julien-lin/universal-pwa-cli
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Ou avec pnpm :
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
pnpm add -g @julien-lin/universal-pwa-cli
|
|
32
|
-
```
|
|
20
|
+
Aucune installation globale — npx est la méthode recommandée pour exécuter le CLI.
|
|
33
21
|
|
|
34
22
|
## Utilisation
|
|
35
23
|
|
|
@@ -50,7 +38,7 @@ pnpm build
|
|
|
50
38
|
yarn build
|
|
51
39
|
|
|
52
40
|
# 2. Puis initialiser la PWA (le CLI détectera automatiquement dist/)
|
|
53
|
-
universal-pwa init --output-dir dist
|
|
41
|
+
npx @julien-lin/universal-pwa-cli init --output-dir dist
|
|
54
42
|
```
|
|
55
43
|
|
|
56
44
|
**Pourquoi ?** Le service worker doit precacher tous vos assets buildés (JS/CSS avec hash). Si vous initialisez avant de builder, le service worker ne connaîtra pas les noms de fichiers hashés.
|
|
@@ -62,7 +50,7 @@ Le CLI détecte automatiquement le répertoire `dist/` pour les projets React/Vi
|
|
|
62
50
|
Exécutez simplement sans arguments pour lancer les prompts interactifs :
|
|
63
51
|
|
|
64
52
|
```bash
|
|
65
|
-
universal-pwa init
|
|
53
|
+
npx @julien-lin/universal-pwa-cli init
|
|
66
54
|
```
|
|
67
55
|
|
|
68
56
|
Le CLI vous guidera à travers :
|
|
@@ -76,7 +64,7 @@ Le CLI vous guidera à travers :
|
|
|
76
64
|
#### Mode Ligne de Commande
|
|
77
65
|
|
|
78
66
|
```bash
|
|
79
|
-
universal-pwa init [options]
|
|
67
|
+
npx @julien-lin/universal-pwa-cli init [options]
|
|
80
68
|
```
|
|
81
69
|
|
|
82
70
|
**Options :**
|
|
@@ -98,23 +86,23 @@ universal-pwa init [options]
|
|
|
98
86
|
```bash
|
|
99
87
|
# Pour un build de production (React/Vite)
|
|
100
88
|
npm run build
|
|
101
|
-
universal-pwa init --output-dir dist --icon-source ./logo.png
|
|
89
|
+
npx @julien-lin/universal-pwa-cli init --output-dir dist --icon-source ./logo.png
|
|
102
90
|
|
|
103
91
|
# Pour le développement ou sites statiques
|
|
104
|
-
universal-pwa init \
|
|
92
|
+
npx @julien-lin/universal-pwa-cli init \
|
|
105
93
|
--name "Mon Application" \
|
|
106
94
|
--short-name "MonApp" \
|
|
107
95
|
--icon-source ./logo.png \
|
|
108
96
|
--theme-color "#2c3e50"
|
|
109
97
|
|
|
110
98
|
# Pour un déploiement sous un sous-chemin
|
|
111
|
-
universal-pwa init \
|
|
99
|
+
npx @julien-lin/universal-pwa-cli init \
|
|
112
100
|
--name "CreativeHub" \
|
|
113
101
|
--output-dir public \
|
|
114
102
|
--base-path "/creativehub/"
|
|
115
103
|
|
|
116
104
|
# Pour une PWA basée sur une API
|
|
117
|
-
universal-pwa init \
|
|
105
|
+
npx @julien-lin/universal-pwa-cli init \
|
|
118
106
|
--name "PWA API" \
|
|
119
107
|
--output-dir dist \
|
|
120
108
|
--base-path "/api/pwa/"
|
|
@@ -151,7 +139,7 @@ Cela garantit:
|
|
|
151
139
|
|
|
152
140
|
```bash
|
|
153
141
|
npm run build
|
|
154
|
-
universal-pwa init \
|
|
142
|
+
npx @julien-lin/universal-pwa-cli init \
|
|
155
143
|
--name "Creative Hub" \
|
|
156
144
|
--output-dir public \
|
|
157
145
|
--base-path "/creative-hub/"
|
|
@@ -161,7 +149,7 @@ universal-pwa init \
|
|
|
161
149
|
|
|
162
150
|
```bash
|
|
163
151
|
pnpm build
|
|
164
|
-
universal-pwa init \
|
|
152
|
+
npx @julien-lin/universal-pwa-cli init \
|
|
165
153
|
--output-dir .next \
|
|
166
154
|
--base-path "/dashboard/"
|
|
167
155
|
```
|
|
@@ -169,7 +157,7 @@ universal-pwa init \
|
|
|
169
157
|
**Site Statique sur Hébergement Partagé** - Déployé à `example.com/apps/myapp/`:
|
|
170
158
|
|
|
171
159
|
```bash
|
|
172
|
-
universal-pwa init \
|
|
160
|
+
npx @julien-lin/universal-pwa-cli init \
|
|
173
161
|
--name "Mon App" \
|
|
174
162
|
--output-dir dist \
|
|
175
163
|
--base-path "/apps/myapp/"
|
|
@@ -261,7 +249,7 @@ Le script injecté émet des événements personnalisés que vous pouvez écoute
|
|
|
261
249
|
Scanne un projet et détecte le framework, l'architecture et les assets.
|
|
262
250
|
|
|
263
251
|
```bash
|
|
264
|
-
universal-pwa scan [options]
|
|
252
|
+
npx @julien-lin/universal-pwa-cli scan [options]
|
|
265
253
|
```
|
|
266
254
|
|
|
267
255
|
**Options :**
|
|
@@ -271,7 +259,7 @@ universal-pwa scan [options]
|
|
|
271
259
|
**Exemple :**
|
|
272
260
|
|
|
273
261
|
```bash
|
|
274
|
-
universal-pwa scan
|
|
262
|
+
npx @julien-lin/universal-pwa-cli scan
|
|
275
263
|
```
|
|
276
264
|
|
|
277
265
|
Affiche :
|
|
@@ -286,7 +274,7 @@ Affiche :
|
|
|
286
274
|
Prévisualise la configuration PWA d'un projet.
|
|
287
275
|
|
|
288
276
|
```bash
|
|
289
|
-
universal-pwa preview [options]
|
|
277
|
+
npx @julien-lin/universal-pwa-cli preview [options]
|
|
290
278
|
```
|
|
291
279
|
|
|
292
280
|
**Options :**
|
|
@@ -298,12 +286,12 @@ universal-pwa preview [options]
|
|
|
298
286
|
**Exemple :**
|
|
299
287
|
|
|
300
288
|
```bash
|
|
301
|
-
universal-pwa preview --port 8080
|
|
289
|
+
npx @julien-lin/universal-pwa-cli preview --port 8080
|
|
302
290
|
```
|
|
303
291
|
|
|
304
292
|
## Fichiers Générés
|
|
305
293
|
|
|
306
|
-
Après avoir exécuté `universal-pwa init`, les fichiers suivants sont générés :
|
|
294
|
+
Après avoir exécuté `npx @julien-lin/universal-pwa-cli init`, les fichiers suivants sont générés :
|
|
307
295
|
|
|
308
296
|
- `manifest.json` - Fichier manifest PWA
|
|
309
297
|
- `sw.js` - Service Worker (Workbox)
|
package/README.md
CHANGED
|
@@ -19,19 +19,7 @@ This command will:
|
|
|
19
19
|
- Generate all PWA assets (icons, manifest, service worker)
|
|
20
20
|
- Inject meta tags into your HTML files
|
|
21
21
|
|
|
22
|
-
No global installation needed
|
|
23
|
-
|
|
24
|
-
## Installation
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npm install -g @julien-lin/universal-pwa-cli
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Or with pnpm:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
pnpm add -g @julien-lin/universal-pwa-cli
|
|
34
|
-
```
|
|
22
|
+
No global installation needed — npx is the recommended way to run the CLI.
|
|
35
23
|
|
|
36
24
|
## Configuration
|
|
37
25
|
|
|
@@ -40,7 +28,7 @@ UniversalPWA peut être configuré via un fichier de configuration pour éviter
|
|
|
40
28
|
### Génération automatique
|
|
41
29
|
|
|
42
30
|
```bash
|
|
43
|
-
universal-pwa generate-config
|
|
31
|
+
npx @julien-lin/universal-pwa-cli generate-config
|
|
44
32
|
```
|
|
45
33
|
|
|
46
34
|
Cette commande génère un fichier `universal-pwa.config.ts` (ou `.js`, `.json`, `.yaml`) basé sur votre projet.
|
|
@@ -83,10 +71,10 @@ yarn build
|
|
|
83
71
|
# 2. Then initialize PWA
|
|
84
72
|
# In interactive mode, select "Production" when prompted
|
|
85
73
|
# The CLI will auto-detect dist/ directory and suggest it
|
|
86
|
-
universal-pwa init
|
|
74
|
+
npx @julien-lin/universal-pwa-cli init
|
|
87
75
|
|
|
88
76
|
# Or explicitly specify output directory
|
|
89
|
-
universal-pwa init --output-dir dist
|
|
77
|
+
npx @julien-lin/universal-pwa-cli init --output-dir dist
|
|
90
78
|
```
|
|
91
79
|
|
|
92
80
|
**Why?** The service worker needs to precache all your built assets (JS/CSS with hashes). If you initialize before building, the service worker won't know about the hashed filenames.
|
|
@@ -104,7 +92,7 @@ universal-pwa init --output-dir dist
|
|
|
104
92
|
Simply run without arguments to launch interactive prompts:
|
|
105
93
|
|
|
106
94
|
```bash
|
|
107
|
-
universal-pwa init
|
|
95
|
+
npx @julien-lin/universal-pwa-cli init
|
|
108
96
|
```
|
|
109
97
|
|
|
110
98
|
The CLI will guide you through a 2-phase workflow:
|
|
@@ -128,7 +116,7 @@ All prompts include smart defaults, validation, and contextual suggestions!
|
|
|
128
116
|
#### Command Line Mode
|
|
129
117
|
|
|
130
118
|
```bash
|
|
131
|
-
universal-pwa init [options]
|
|
119
|
+
npx @julien-lin/universal-pwa-cli init [options]
|
|
132
120
|
```
|
|
133
121
|
|
|
134
122
|
**Options:**
|
|
@@ -150,23 +138,23 @@ universal-pwa init [options]
|
|
|
150
138
|
```bash
|
|
151
139
|
# For production build (React/Vite)
|
|
152
140
|
npm run build
|
|
153
|
-
universal-pwa init --output-dir dist --icon-source ./logo.png
|
|
141
|
+
npx @julien-lin/universal-pwa-cli init --output-dir dist --icon-source ./logo.png
|
|
154
142
|
|
|
155
143
|
# For development or static sites
|
|
156
|
-
universal-pwa init \
|
|
144
|
+
npx @julien-lin/universal-pwa-cli init \
|
|
157
145
|
--name "My Application" \
|
|
158
146
|
--short-name "MyApp" \
|
|
159
147
|
--icon-source ./logo.png \
|
|
160
148
|
--theme-color "#2c3e50"
|
|
161
149
|
|
|
162
150
|
# For deployment under a subpath
|
|
163
|
-
universal-pwa init \
|
|
151
|
+
npx @julien-lin/universal-pwa-cli init \
|
|
164
152
|
--name "CreativeHub" \
|
|
165
153
|
--output-dir public \
|
|
166
154
|
--base-path "/creativehub/"
|
|
167
155
|
|
|
168
156
|
# For API-based PWA
|
|
169
|
-
universal-pwa init \
|
|
157
|
+
npx @julien-lin/universal-pwa-cli init \
|
|
170
158
|
--name "PWA API" \
|
|
171
159
|
--output-dir dist \
|
|
172
160
|
--base-path "/api/pwa/"
|
|
@@ -203,7 +191,7 @@ This ensures:
|
|
|
203
191
|
|
|
204
192
|
```bash
|
|
205
193
|
npm run build
|
|
206
|
-
universal-pwa init \
|
|
194
|
+
npx @julien-lin/universal-pwa-cli init \
|
|
207
195
|
--name "Creative Hub" \
|
|
208
196
|
--output-dir public \
|
|
209
197
|
--base-path "/creative-hub/"
|
|
@@ -213,7 +201,7 @@ universal-pwa init \
|
|
|
213
201
|
|
|
214
202
|
```bash
|
|
215
203
|
pnpm build
|
|
216
|
-
universal-pwa init \
|
|
204
|
+
npx @julien-lin/universal-pwa-cli init \
|
|
217
205
|
--output-dir .next \
|
|
218
206
|
--base-path "/dashboard/"
|
|
219
207
|
```
|
|
@@ -221,7 +209,7 @@ universal-pwa init \
|
|
|
221
209
|
**Static Site on Shared Hosting** - Deployed at `example.com/apps/myapp/`:
|
|
222
210
|
|
|
223
211
|
```bash
|
|
224
|
-
universal-pwa init \
|
|
212
|
+
npx @julien-lin/universal-pwa-cli init \
|
|
225
213
|
--name "My App" \
|
|
226
214
|
--output-dir dist \
|
|
227
215
|
--base-path "/apps/myapp/"
|
|
@@ -313,7 +301,7 @@ The injected script emits custom events you can listen to:
|
|
|
313
301
|
Scan a project and detect framework, architecture, and assets.
|
|
314
302
|
|
|
315
303
|
```bash
|
|
316
|
-
universal-pwa scan [options]
|
|
304
|
+
npx @julien-lin/universal-pwa-cli scan [options]
|
|
317
305
|
```
|
|
318
306
|
|
|
319
307
|
**Options:**
|
|
@@ -323,7 +311,7 @@ universal-pwa scan [options]
|
|
|
323
311
|
**Example:**
|
|
324
312
|
|
|
325
313
|
```bash
|
|
326
|
-
universal-pwa scan
|
|
314
|
+
npx @julien-lin/universal-pwa-cli scan
|
|
327
315
|
```
|
|
328
316
|
|
|
329
317
|
Output:
|
|
@@ -338,7 +326,7 @@ Output:
|
|
|
338
326
|
Preview the PWA configuration of a project.
|
|
339
327
|
|
|
340
328
|
```bash
|
|
341
|
-
universal-pwa preview [options]
|
|
329
|
+
npx @julien-lin/universal-pwa-cli preview [options]
|
|
342
330
|
```
|
|
343
331
|
|
|
344
332
|
**Options:**
|
|
@@ -350,12 +338,12 @@ universal-pwa preview [options]
|
|
|
350
338
|
**Example:**
|
|
351
339
|
|
|
352
340
|
```bash
|
|
353
|
-
universal-pwa preview --port 8080
|
|
341
|
+
npx @julien-lin/universal-pwa-cli preview --port 8080
|
|
354
342
|
```
|
|
355
343
|
|
|
356
344
|
## Generated Files
|
|
357
345
|
|
|
358
|
-
After running `universal-pwa init`, the following files are generated:
|
|
346
|
+
After running `npx @julien-lin/universal-pwa-cli init`, the following files are generated:
|
|
359
347
|
|
|
360
348
|
- `manifest.json` - PWA manifest file
|
|
361
349
|
- `sw.js` - Service Worker (Workbox)
|
package/dist/index.cjs
CHANGED
|
@@ -2737,7 +2737,7 @@ async function promptInitOptions(projectPath, framework, architecture = null) {
|
|
|
2737
2737
|
// package.json
|
|
2738
2738
|
var package_default = {
|
|
2739
2739
|
name: "@julien-lin/universal-pwa-cli",
|
|
2740
|
-
version: "1.3.
|
|
2740
|
+
version: "1.3.16",
|
|
2741
2741
|
description: "CLI to transform any web project into a PWA",
|
|
2742
2742
|
keywords: [
|
|
2743
2743
|
"pwa",
|
package/dist/index.js
CHANGED
|
@@ -2629,7 +2629,7 @@ async function promptInitOptions(projectPath, framework, architecture = null) {
|
|
|
2629
2629
|
// package.json
|
|
2630
2630
|
var package_default = {
|
|
2631
2631
|
name: "@julien-lin/universal-pwa-cli",
|
|
2632
|
-
version: "1.3.
|
|
2632
|
+
version: "1.3.16",
|
|
2633
2633
|
description: "CLI to transform any web project into a PWA",
|
|
2634
2634
|
keywords: [
|
|
2635
2635
|
"pwa",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@julien-lin/universal-pwa-cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.16",
|
|
4
4
|
"description": "CLI to transform any web project into a PWA",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pwa",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"string-width": "^8.1.1",
|
|
67
67
|
"strip-ansi": "^7.1.2",
|
|
68
68
|
"zod": "^4.3.6",
|
|
69
|
-
"@julien-lin/universal-pwa-core": "^1.3.
|
|
69
|
+
"@julien-lin/universal-pwa-core": "^1.3.16"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@vitest/coverage-v8": "^4.0.18",
|