scaffold-doc-cli 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/index.js +8 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -8,6 +8,14 @@ import { fileURLToPath } from 'url';
8
8
 
9
9
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
10
10
 
11
+ // Handle version check
12
+ const args = process.argv.slice(2);
13
+ if (args.includes('-v') || args.includes('--version')) {
14
+ const packageJson = await fs.readJson(path.join(__dirname, 'package.json'));
15
+ console.log(packageJson.version);
16
+ process.exit(0);
17
+ }
18
+
11
19
  async function init() {
12
20
  console.log(chalk.green.bold('Welcome to the Motin Documentation Initializer! 🚀'));
13
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scaffold-doc-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "CLI tool to scaffold standardized documentation structure for projects.",
5
5
  "main": "index.js",
6
6
  "type": "module",