sg-frontend-starter 1.0.15 → 1.0.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/postinstall.js +10 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sg-frontend-starter",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
package/postinstall.js CHANGED
@@ -14,10 +14,18 @@ const targetPackageJson = path.join(projectRoot, 'package.json');
14
14
  const sourcePackageJson = path.join(source, 'package.json');
15
15
  const devPackageJson = path.join(projectRoot, 'package.json.dev');
16
16
 
17
- // Az eredeti package.json tartalmát másoljuk package.json.dev néven
17
+ // Az eredeti package.json tartalmát másoljuk package.json.dev néven, de postinstall script nélkül
18
18
  if (fs.existsSync(sourcePackageJson)) {
19
19
  try {
20
- fs.copyFileSync(sourcePackageJson, devPackageJson);
20
+ const raw = fs.readFileSync(sourcePackageJson, 'utf8');
21
+ const pkg = JSON.parse(raw);
22
+
23
+ // Eltávolítjuk a postinstall scriptet
24
+ if (pkg.scripts && pkg.scripts.postinstall) {
25
+ delete pkg.scripts.postinstall;
26
+ }
27
+
28
+ fs.writeFileSync(devPackageJson, JSON.stringify(pkg, null, 2) + '\n');
21
29
  console.log('✓ package.json.dev létrehozva');
22
30
  } catch (error) {
23
31
  console.error('Hiba a package.json.dev létrehozása során:', error);