@julien-lin/universal-pwa-cli 1.3.5 → 1.3.7
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 +13 -0
- package/README.md +13 -0
- package/dist/index.cjs +26 -2
- package/dist/index.js +26 -2
- package/package.json +2 -2
package/README.fr.md
CHANGED
|
@@ -5,6 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
Interface en ligne de commande pour UniversalPWA - Transformez n'importe quel projet web en Progressive Web App (PWA) en un clic.
|
|
7
7
|
|
|
8
|
+
## Démarrage Rapide (Sans Installation)
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx @julien-lin/universal-pwa-cli init
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Cette commande va :
|
|
15
|
+
- Vous guider à travers une configuration interactive
|
|
16
|
+
- Générer tous les assets PWA (icônes, manifest, service worker)
|
|
17
|
+
- Injecter les meta tags dans vos fichiers HTML
|
|
18
|
+
|
|
19
|
+
Aucune installation globale nécessaire !
|
|
20
|
+
|
|
8
21
|
## Installation
|
|
9
22
|
|
|
10
23
|
```bash
|
package/README.md
CHANGED
|
@@ -7,6 +7,19 @@ Command-line interface for UniversalPWA - Transform any web project into a Progr
|
|
|
7
7
|
|
|
8
8
|
**🇫🇷 [Documentation en français](./README.fr.md)**
|
|
9
9
|
|
|
10
|
+
## Quick Start (No Installation Required)
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx @julien-lin/universal-pwa-cli init
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This command will:
|
|
17
|
+
- Guide you through an interactive setup
|
|
18
|
+
- Generate all PWA assets (icons, manifest, service worker)
|
|
19
|
+
- Inject meta tags into your HTML files
|
|
20
|
+
|
|
21
|
+
No global installation needed!
|
|
22
|
+
|
|
10
23
|
## Installation
|
|
11
24
|
|
|
12
25
|
```bash
|
package/dist/index.cjs
CHANGED
|
@@ -1554,8 +1554,32 @@ async function initCommand(options = {}) {
|
|
|
1554
1554
|
try {
|
|
1555
1555
|
const iconResult = await (0, import_universal_pwa_core3.generateIcons)({
|
|
1556
1556
|
sourceImage: iconSourcePath,
|
|
1557
|
-
outputDir: finalOutputDir
|
|
1557
|
+
outputDir: finalOutputDir,
|
|
1558
|
+
validate: true,
|
|
1559
|
+
// Enable validation
|
|
1560
|
+
strictValidation: false
|
|
1561
|
+
// Don't block on warnings, only errors
|
|
1558
1562
|
});
|
|
1563
|
+
if (iconResult.validation) {
|
|
1564
|
+
const { validation } = iconResult;
|
|
1565
|
+
if (validation.errors.length > 0) {
|
|
1566
|
+
validation.errors.forEach((error) => {
|
|
1567
|
+
result.errors.push(`Icon validation: ${error}`);
|
|
1568
|
+
console.log(import_chalk2.default.red(`\u2717 ${error}`));
|
|
1569
|
+
});
|
|
1570
|
+
}
|
|
1571
|
+
if (validation.warnings.length > 0) {
|
|
1572
|
+
validation.warnings.forEach((warning) => {
|
|
1573
|
+
result.warnings.push(`Icon validation: ${warning}`);
|
|
1574
|
+
console.log(import_chalk2.default.yellow(`\u26A0 ${warning}`));
|
|
1575
|
+
});
|
|
1576
|
+
}
|
|
1577
|
+
if (validation.suggestions.length > 0) {
|
|
1578
|
+
validation.suggestions.forEach((suggestion) => {
|
|
1579
|
+
console.log(import_chalk2.default.blue(`\u{1F4A1} ${suggestion}`));
|
|
1580
|
+
});
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1559
1583
|
iconPaths = iconResult.icons.map((icon) => icon.src);
|
|
1560
1584
|
result.iconsGenerated = iconResult.icons.length;
|
|
1561
1585
|
const appleTouchIconPath = (0, import_path2.join)(finalOutputDir, "apple-touch-icon.png");
|
|
@@ -2768,7 +2792,7 @@ async function promptInitOptions(projectPath, framework, architecture = null) {
|
|
|
2768
2792
|
// package.json
|
|
2769
2793
|
var package_default = {
|
|
2770
2794
|
name: "@julien-lin/universal-pwa-cli",
|
|
2771
|
-
version: "1.3.
|
|
2795
|
+
version: "1.3.7",
|
|
2772
2796
|
description: "CLI to transform any web project into a PWA",
|
|
2773
2797
|
keywords: [
|
|
2774
2798
|
"pwa",
|
package/dist/index.js
CHANGED
|
@@ -569,8 +569,32 @@ async function initCommand(options = {}) {
|
|
|
569
569
|
try {
|
|
570
570
|
const iconResult = await generateIcons({
|
|
571
571
|
sourceImage: iconSourcePath,
|
|
572
|
-
outputDir: finalOutputDir
|
|
572
|
+
outputDir: finalOutputDir,
|
|
573
|
+
validate: true,
|
|
574
|
+
// Enable validation
|
|
575
|
+
strictValidation: false
|
|
576
|
+
// Don't block on warnings, only errors
|
|
573
577
|
});
|
|
578
|
+
if (iconResult.validation) {
|
|
579
|
+
const { validation } = iconResult;
|
|
580
|
+
if (validation.errors.length > 0) {
|
|
581
|
+
validation.errors.forEach((error) => {
|
|
582
|
+
result.errors.push(`Icon validation: ${error}`);
|
|
583
|
+
console.log(chalk2.red(`\u2717 ${error}`));
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
if (validation.warnings.length > 0) {
|
|
587
|
+
validation.warnings.forEach((warning) => {
|
|
588
|
+
result.warnings.push(`Icon validation: ${warning}`);
|
|
589
|
+
console.log(chalk2.yellow(`\u26A0 ${warning}`));
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
if (validation.suggestions.length > 0) {
|
|
593
|
+
validation.suggestions.forEach((suggestion) => {
|
|
594
|
+
console.log(chalk2.blue(`\u{1F4A1} ${suggestion}`));
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
}
|
|
574
598
|
iconPaths = iconResult.icons.map((icon) => icon.src);
|
|
575
599
|
result.iconsGenerated = iconResult.icons.length;
|
|
576
600
|
const appleTouchIconPath = join2(finalOutputDir, "apple-touch-icon.png");
|
|
@@ -1781,7 +1805,7 @@ async function promptInitOptions(projectPath, framework, architecture = null) {
|
|
|
1781
1805
|
// package.json
|
|
1782
1806
|
var package_default = {
|
|
1783
1807
|
name: "@julien-lin/universal-pwa-cli",
|
|
1784
|
-
version: "1.3.
|
|
1808
|
+
version: "1.3.7",
|
|
1785
1809
|
description: "CLI to transform any web project into a PWA",
|
|
1786
1810
|
keywords: [
|
|
1787
1811
|
"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.7",
|
|
4
4
|
"description": "CLI to transform any web project into a PWA",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pwa",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"inquirer": "^12.0.0",
|
|
63
63
|
"pino": "^9.14.0",
|
|
64
64
|
"zod": "^4.2.1",
|
|
65
|
-
"@julien-lin/universal-pwa-core": "^1.3.
|
|
65
|
+
"@julien-lin/universal-pwa-core": "^1.3.7"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@vitest/coverage-v8": "^2.1.4",
|