flowershow 0.1.4 → 0.1.6
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/lib/Installer.js +15 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# flowershow
|
|
2
2
|
|
|
3
|
+
## 0.1.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f136048: Remove `pages/index.tsx` file from the copied Flowershow template, to allow users to set their own home page with MD file.
|
|
8
|
+
|
|
9
|
+
## 0.1.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Replace config.js with config.mjs
|
|
14
|
+
|
|
3
15
|
## 0.1.4
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
package/src/lib/Installer.js
CHANGED
|
@@ -112,10 +112,18 @@ export default class Installer {
|
|
|
112
112
|
fs.writeFile(`${contentPath}/index.md`, homePageContent, { flag: "a" }, (err) => { } // eslint-disable-line @typescript-eslint/no-empty-function
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
|
-
//
|
|
116
|
-
if (
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
// if there is a config.js file from older flowershow, change its extension.
|
|
116
|
+
if (fs.existsSync(`${contentPath}/config.js`)) {
|
|
117
|
+
fs.rename(`${contentPath}/config.js`, `${contentPath}/config.mjs`, (err) => {
|
|
118
|
+
if (err)
|
|
119
|
+
info(`Failed to rename ${contentPath}/config.js file`);
|
|
120
|
+
info(`Renamed config.js file in ${contentDir} to config.mjs`);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
// // if there is no config.mjs file, create one
|
|
124
|
+
if (!fs.existsSync(`${contentPath}/config.mjs`)) {
|
|
125
|
+
info(`No config.mjs file found in ${contentDir}. Flowershow will create one for you.`);
|
|
126
|
+
fs.writeFile(`${contentPath}/config.mjs`, "const config = {};\nexport default config;", { flag: "a" }, (err) => { } // eslint-disable-line @typescript-eslint/no-empty-function
|
|
119
127
|
);
|
|
120
128
|
}
|
|
121
129
|
// create flowershow template
|
|
@@ -139,6 +147,8 @@ export default class Installer {
|
|
|
139
147
|
fs.rmSync(`${flowershowDir}/project.json`, { force: true });
|
|
140
148
|
fs.rmSync(`${flowershowDir}/.eslintrc.json`, { force: true });
|
|
141
149
|
fs.rmSync(`${flowershowDir}/jest.config.js`, { force: true });
|
|
150
|
+
// TODO (temporary here) remove Flowershow app home page
|
|
151
|
+
fs.rmSync(`${flowershowDir}/pages/index.tsx`, { force: true });
|
|
142
152
|
// update content and assets symlinks
|
|
143
153
|
const contentSymlinkPath = path.relative(`${flowershowDir}`, contentDir);
|
|
144
154
|
fs.symlinkSync(contentSymlinkPath, `${flowershowDir}/content`, "junction");
|
|
@@ -155,7 +165,7 @@ export default class Installer {
|
|
|
155
165
|
log(stdout);
|
|
156
166
|
log(stderr);
|
|
157
167
|
stopSpinner();
|
|
158
|
-
success("
|
|
168
|
+
success("Successfully installed Flowershow!");
|
|
159
169
|
}
|
|
160
170
|
catch (err) {
|
|
161
171
|
error(`Failed to install Flowershow dependencies: ${err.message}`);
|