clovie 0.1.22 → 0.1.23

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/bin/cli.js CHANGED
@@ -3,10 +3,15 @@ import path from "path";
3
3
  import commandLineArgs from "command-line-args";
4
4
  import { fileURLToPath } from 'url';
5
5
  import { dirname } from 'path';
6
+ import { readFileSync } from 'fs';
6
7
 
7
8
  const __filename = fileURLToPath(import.meta.url);
8
9
  const __dirname = dirname(__filename);
9
10
 
11
+ // Read package version
12
+ const packageJson = JSON.parse(readFileSync(path.join(__dirname, '../package.json'), 'utf8'));
13
+ const CLOVIE_VERSION = packageJson.version;
14
+
10
15
  // Local - import from compiled dist for published package
11
16
  // import { createClovie } from "../lib/createClovie.js";
12
17
  import { createClovie } from "../dist/index.js";
@@ -159,6 +164,7 @@ if (process.argv.includes('create') && process.argv.length > 2) {
159
164
  let content = fs.readFileSync(srcPath, 'utf8');
160
165
  // Replace template variables
161
166
  content = content.replace(/\{\{projectName\}\}/g, projectName);
167
+ content = content.replace(/\{\{clovieVersion\}\}/g, CLOVIE_VERSION);
162
168
  fs.writeFileSync(destPath, content);
163
169
  }
164
170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clovie",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Vintage web dev tooling with modern quality of life",
5
5
  "keywords": [
6
6
  "static-site-generator",
@@ -10,7 +10,7 @@
10
10
  "build": "clovie build"
11
11
  },
12
12
  "dependencies": {
13
- "clovie": "^0.1.16"
13
+ "clovie": "^{{clovieVersion}}"
14
14
  },
15
15
  "devDependencies": {},
16
16
  "keywords": [
@@ -9,7 +9,7 @@
9
9
  "deploy": "npm run build && npm run upload"
10
10
  },
11
11
  "devDependencies": {
12
- "clovie": "^0.1.16"
12
+ "clovie": "^{{clovieVersion}}"
13
13
  },
14
14
  "keywords": [
15
15
  "static-site",