sg-frontend-starter 1.0.16 → 1.0.18
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/package.json +1 -1
- package/postinstall.js +22 -0
package/package.json
CHANGED
package/postinstall.js
CHANGED
|
@@ -59,6 +59,28 @@ if (fs.existsSync(source)) {
|
|
|
59
59
|
console.log('✓ sg-frontend-starter tartalma sikeresen áthelyezve');
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
// Hozzunk létre egy setup.js fájlt a telepítés befejezéséhez
|
|
63
|
+
const setupScript = `import fs from 'fs';
|
|
64
|
+
import { execSync } from 'child_process';
|
|
65
|
+
|
|
66
|
+
console.log('📦 Package.json frissítése...');
|
|
67
|
+
fs.copyFileSync('package.json.dev', 'package.json');
|
|
68
|
+
fs.unlinkSync('package.json.dev');
|
|
69
|
+
|
|
70
|
+
console.log('📦 Függőségek telepítése...');
|
|
71
|
+
execSync('npm install', { stdio: 'inherit' });
|
|
72
|
+
|
|
73
|
+
console.log('🚀 Alkalmazás indítása...');
|
|
74
|
+
execSync('npm run dev', { stdio: 'inherit' });
|
|
75
|
+
`;
|
|
76
|
+
|
|
77
|
+
fs.writeFileSync(path.join(projectRoot, 'setup.js'), setupScript);
|
|
78
|
+
console.log('');
|
|
79
|
+
console.log('✓ Telepítés kész!');
|
|
80
|
+
console.log('');
|
|
81
|
+
console.log('⚡ A telepítés befejezéséhez futtasd: node setup.js');
|
|
82
|
+
console.log('');
|
|
83
|
+
|
|
62
84
|
// Segédfunkció a mappák rekurzív másolásához
|
|
63
85
|
function copyDir(src, dest) {
|
|
64
86
|
fs.mkdirSync(dest, { recursive: true });
|