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.
- package/index.js +8 -0
- 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
|
|