jizy-packer 2.1.19 → 2.1.20

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.
@@ -27,7 +27,7 @@
27
27
  "license": "MIT",
28
28
  "description": "",
29
29
  "dependencies": {
30
- "jizy-packer": "^2.1",
30
+ "jizy-packer": "^2.1.0",
31
31
  "less": "^4.4.1"
32
32
  }
33
33
  }
package/cli/init.js CHANGED
@@ -11,22 +11,21 @@ async function copyAndReplace(srcDir, destDir, replacements) {
11
11
  const destPath = path.join(destDir, destName);
12
12
 
13
13
  if (fs.existsSync(destPath)) {
14
- if (entry.name === 'package.json') {
15
- // read json file and check if the name of the package is set
16
- const pkg = JSON.parse(fs.readFileSync(srcPath, "utf8"));
17
- if (pkg.name) {
18
- continue; // skip existing package.json with name set
19
- }
20
- }
21
- else {
14
+ if (entry.name !== 'package.json') {
22
15
  continue; // Skip existing files & folders
23
16
  }
17
+
18
+ // read json file and check if the name of the package is set
19
+ const pkg = JSON.parse(fs.readFileSync(srcPath, "utf8"));
20
+ if (pkg.name) {
21
+ continue; // skip existing package.json with name set
22
+ }
24
23
  }
25
24
 
26
25
  if (entry.isDirectory()) {
27
26
  if (!fs.existsSync(destPath)) fs.mkdirSync(destPath);
28
27
  await copyAndReplace(srcPath, destPath, replacements);
29
- return;
28
+ continue;
30
29
  }
31
30
 
32
31
  let content = fs.readFileSync(srcPath, "utf8");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jizy-packer",
3
- "version": "2.1.19",
3
+ "version": "2.1.20",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "_example",
@@ -1,3 +0,0 @@
1
- import { jPackCli } from 'jizy-packer';
2
- import jPackData from '../config/jpack.js';
3
- jPackCli(jPackData);