flowershow 0.1.4 → 0.1.5

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # flowershow
2
2
 
3
+ ## 0.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Replace config.js with config.mjs
8
+
3
9
  ## 0.1.4
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowershow",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Publish your digital garden",
5
5
  "bin": {
6
6
  "flowershow": "src/bin/cli.js"
@@ -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
- // // if there is no config.js file, create one
116
- if (!fs.existsSync(`${contentPath}/config.js`)) {
117
- info(`No config.js file found in ${contentDir}. Flowershow will create one for you.`);
118
- fs.writeFile(`${contentPath}/config.js`, "const config = {};\nexport default config;", { flag: "a" }, (err) => { } // eslint-disable-line @typescript-eslint/no-empty-function
115
+ // if there is a config.js file from older flowershow, change it's 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