@bobfrankston/importgen 0.1.13 → 0.1.14
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/.claude/settings.local.json +2 -1
- package/index.js +5 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import fs from 'node:fs';
|
|
7
7
|
import path from 'node:path';
|
|
8
8
|
import chokidar from 'chokidar';
|
|
9
|
+
import pkg from './package.json' with { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Resolve dependency path based on version specifier
|
|
11
12
|
*/
|
|
@@ -174,6 +175,10 @@ function generateImportMap(packageJsonPath, htmlFilePath) {
|
|
|
174
175
|
}
|
|
175
176
|
// Parse CLI arguments
|
|
176
177
|
const args = process.argv.slice(2);
|
|
178
|
+
if (args.includes('-v') || args.includes('--version')) {
|
|
179
|
+
console.log(pkg.version);
|
|
180
|
+
process.exit(0);
|
|
181
|
+
}
|
|
177
182
|
const watchMode = args.includes('-w') || args.includes('--watch');
|
|
178
183
|
const packageJsonPath = path.join(process.cwd(), 'package.json');
|
|
179
184
|
// Find HTML file - check command line arg first, then try common names
|