@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(
|
|
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
|
@@ -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(
|
|
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))
|