flowershow 0.0.7 → 0.0.8
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/project.json +1 -2
- package/src/lib/Installer.js +15 -0
- package/src/lib/utils/index.js +1 -0
- package/src/lib/utils/isSubdir.js +7 -0
package/CHANGELOG.md
ADDED
package/package.json
CHANGED
package/project.json
CHANGED
package/src/lib/Installer.js
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
success,
|
|
16
16
|
logWithSpinner,
|
|
17
17
|
stopSpinner,
|
|
18
|
+
isSubdir,
|
|
18
19
|
} from "./utils/index.js";
|
|
19
20
|
|
|
20
21
|
import { FLOWERSHOW_FOLDER_NAME } from "./const.js";
|
|
@@ -77,6 +78,20 @@ export default class Creator {
|
|
|
77
78
|
]);
|
|
78
79
|
|
|
79
80
|
const contentDir = path.resolve(context, contentPath);
|
|
81
|
+
|
|
82
|
+
// don't allow for installing the template anywhere within the content folder
|
|
83
|
+
// as it will break esbuild
|
|
84
|
+
if (isSubdir(flowershowDir, contentDir)) {
|
|
85
|
+
log(`Provided content directory: ${contentDir}`);
|
|
86
|
+
log(
|
|
87
|
+
`Provided Flowershow template installation directory: ${flowershowDir}`
|
|
88
|
+
);
|
|
89
|
+
error(
|
|
90
|
+
`You can't install the Flowershow template inside your content folder.`
|
|
91
|
+
);
|
|
92
|
+
exit(1);
|
|
93
|
+
}
|
|
94
|
+
|
|
80
95
|
const assetFolderChoices = fs
|
|
81
96
|
.readdirSync(contentDir, { withFileTypes: true })
|
|
82
97
|
.filter((d) => d.isDirectory())
|
package/src/lib/utils/index.js
CHANGED