flowershow 0.1.3 → 0.1.4
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 +12 -0
- package/package.json +1 -1
- package/src/bin/cli.js +1 -1
- package/src/lib/Installer.js +4 -4
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/bin/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ const { version: cli } = require("../../package.json");
|
|
|
10
10
|
// import packageJson from "#package.json" assert { type: "json" };
|
|
11
11
|
const { version: node, platform, argv } = process;
|
|
12
12
|
if (platform === "win32") {
|
|
13
|
-
warn("This may not work as expected. You're trying to run
|
|
13
|
+
warn("This may not work as expected. You're trying to run Flowershow CLI on Windows, which is not thoroughly tested. Please submit an issue if you encounter any problems: https://github.com/flowershow/flowershow/issues");
|
|
14
14
|
}
|
|
15
15
|
const [, , cmd, ...args] = argv;
|
|
16
16
|
sendEvent({
|
package/src/lib/Installer.js
CHANGED
|
@@ -109,13 +109,13 @@ export default class Installer {
|
|
|
109
109
|
info(`No index.md file found in ${contentDir}. Flowershow will create one for you.`);
|
|
110
110
|
const homePageContent = "# Welcome to my Flowershow site!";
|
|
111
111
|
// eslint-disable-next-line no-unused-vars
|
|
112
|
-
fs.writeFile(`${contentPath}/index.md`, homePageContent, { flag: "a" }, (err) => { } // eslint-disable-line no-
|
|
112
|
+
fs.writeFile(`${contentPath}/index.md`, homePageContent, { flag: "a" }, (err) => { } // eslint-disable-line @typescript-eslint/no-empty-function
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
// // if there is no config.js file, create one
|
|
116
116
|
if (!fs.existsSync(`${contentPath}/config.js`)) {
|
|
117
117
|
info(`No config.js file found in ${contentDir}. Flowershow will create one for you.`);
|
|
118
|
-
fs.writeFile(`${contentPath}/config.js`, "{}", { flag: "a" }, (err) => { } // eslint-disable-line no-
|
|
118
|
+
fs.writeFile(`${contentPath}/config.js`, "const config = {};\nexport default config;", { flag: "a" }, (err) => { } // eslint-disable-line @typescript-eslint/no-empty-function
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
121
|
// create flowershow template
|
|
@@ -141,10 +141,10 @@ export default class Installer {
|
|
|
141
141
|
fs.rmSync(`${flowershowDir}/jest.config.js`, { force: true });
|
|
142
142
|
// update content and assets symlinks
|
|
143
143
|
const contentSymlinkPath = path.relative(`${flowershowDir}`, contentDir);
|
|
144
|
-
fs.symlinkSync(contentSymlinkPath, `${flowershowDir}/content
|
|
144
|
+
fs.symlinkSync(contentSymlinkPath, `${flowershowDir}/content`, "junction");
|
|
145
145
|
if (assetsFolder !== "none") {
|
|
146
146
|
const assetsSymlinkPath = path.relative(`${flowershowDir}/public`, `${contentDir}/${assetsFolder}`);
|
|
147
|
-
fs.symlinkSync(assetsSymlinkPath, `${flowershowDir}/public/${assetsFolder}
|
|
147
|
+
fs.symlinkSync(assetsSymlinkPath, `${flowershowDir}/public/${assetsFolder}`, "junction");
|
|
148
148
|
}
|
|
149
149
|
// install flowershow dependencies
|
|
150
150
|
logWithSpinner({ symbol: "🌸", msg: `Installing Flowershow dependencies` });
|