@tsparticles/cli 1.4.0 → 1.4.1

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.
@@ -69,7 +69,9 @@ async function getFolderStats(folderPath, bundlePath) {
69
69
  * @returns the stats for the dist folder
70
70
  */
71
71
  async function getDistStats(basePath) {
72
- const distFolder = path_1.default.join(basePath, "dist"), pkgInfo = (await fs_extra_1.default.exists(distFolder)) ? await Promise.resolve(`${path_1.default.join(distFolder, "package.json")}`).then(s => __importStar(require(s))) : {}, bundlePath = (await fs_extra_1.default.exists(distFolder)) && pkgInfo.jsdelivr
72
+ const distFolder = path_1.default.join(basePath, "dist"), pkgInfo = (await fs_extra_1.default.exists(path_1.default.join(distFolder, "package.json")))
73
+ ? await Promise.resolve(`${path_1.default.join(distFolder, "package.json")}`).then(s => __importStar(require(s)))
74
+ : {}, bundlePath = (await fs_extra_1.default.exists(distFolder)) && pkgInfo.jsdelivr
73
75
  ? path_1.default.resolve(path_1.default.join(distFolder, pkgInfo.jsdelivr))
74
76
  : undefined;
75
77
  return await getFolderStats(distFolder, bundlePath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/cli",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "tsparticles-cli": "dist/cli.js"
@@ -56,7 +56,9 @@ async function getFolderStats(folderPath: string, bundlePath?: string): Promise<
56
56
  */
57
57
  export async function getDistStats(basePath: string): Promise<IDistStats> {
58
58
  const distFolder = path.join(basePath, "dist"),
59
- pkgInfo = (await fs.exists(distFolder)) ? await import(path.join(distFolder, "package.json")) : {},
59
+ pkgInfo = (await fs.exists(path.join(distFolder, "package.json")))
60
+ ? await import(path.join(distFolder, "package.json"))
61
+ : {},
60
62
  bundlePath =
61
63
  (await fs.exists(distFolder)) && pkgInfo.jsdelivr
62
64
  ? path.resolve(path.join(distFolder, pkgInfo.jsdelivr))