flowershow 0.1.2 → 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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # flowershow
2
2
 
3
+ ## 0.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix: incorrect `config.js` file created by the CLI
8
+
9
+ ## 0.1.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Remove unneeded dev files from cloned template.
14
+
3
15
  ## 0.1.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Flowershow CLI
2
2
 
3
+ ## CLI commands
4
+
5
+ Install Flowershow:
6
+
7
+ ```
8
+ npx flowershow@latest install
9
+ ```
10
+
11
+ Preview your Flowershow website:
12
+
13
+ ```bash
14
+ npx flowershow@latest preview
15
+ ```
16
+
17
+ Static build your website:
18
+
19
+ ```bash
20
+ npx flowershow@latest export
21
+ ```
22
+
23
+ See all available commands:
24
+
3
25
  ```bash
4
- npx flowershow --help
26
+ npx flowershow@latest --help
5
27
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowershow",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Publish your digital garden",
5
5
  "bin": {
6
6
  "flowershow": "src/bin/cli.js"
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 Flowreshow CLI on Windows, which is not thoroughly tested. Please submit an issue if you encounter any problems: https://github.com/flowershow/flowershow/issues");
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({
@@ -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-unused-vars
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-unused-vars
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
@@ -135,12 +135,16 @@ export default class Installer {
135
135
  log(err);
136
136
  exit(1);
137
137
  }
138
+ // remove unneeded dev files
139
+ fs.rmSync(`${flowershowDir}/project.json`, { force: true });
140
+ fs.rmSync(`${flowershowDir}/.eslintrc.json`, { force: true });
141
+ fs.rmSync(`${flowershowDir}/jest.config.js`, { force: true });
138
142
  // update content and assets symlinks
139
143
  const contentSymlinkPath = path.relative(`${flowershowDir}`, contentDir);
140
- fs.symlinkSync(contentSymlinkPath, `${flowershowDir}/content`);
144
+ fs.symlinkSync(contentSymlinkPath, `${flowershowDir}/content`, "junction");
141
145
  if (assetsFolder !== "none") {
142
146
  const assetsSymlinkPath = path.relative(`${flowershowDir}/public`, `${contentDir}/${assetsFolder}`);
143
- fs.symlinkSync(assetsSymlinkPath, `${flowershowDir}/public/${assetsFolder}`);
147
+ fs.symlinkSync(assetsSymlinkPath, `${flowershowDir}/public/${assetsFolder}`, "junction");
144
148
  }
145
149
  // install flowershow dependencies
146
150
  logWithSpinner({ symbol: "🌸", msg: `Installing Flowershow dependencies` });