@xvml/cli 0.1.0 → 0.1.1
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/dist/src/cli.js +4 -1
- package/package.json +1 -1
package/dist/src/cli.js
CHANGED
|
@@ -3,10 +3,13 @@ import chalk from 'chalk';
|
|
|
3
3
|
import fs from 'fs/promises';
|
|
4
4
|
import { watch as fsWatch } from 'fs';
|
|
5
5
|
import path from 'path';
|
|
6
|
+
import { createRequire } from 'module';
|
|
6
7
|
import fse from 'fs-extra';
|
|
7
8
|
import { renderFile, outputPath } from './renderer.js';
|
|
8
9
|
import { parse, ParseError } from './parser.js';
|
|
9
10
|
import { askClaude, slugify } from './agent.js';
|
|
11
|
+
const require = createRequire(import.meta.url);
|
|
12
|
+
const { version } = require('../package.json');
|
|
10
13
|
const XVMLRC_DEFAULT = JSON.stringify({ outDir: 'docs', spec: 1 }, null, 2);
|
|
11
14
|
async function findVmlFiles(dir) {
|
|
12
15
|
const SKIP = new Set(['node_modules', 'docs', 'dist', '.git']);
|
|
@@ -54,7 +57,7 @@ export function buildCli() {
|
|
|
54
57
|
program
|
|
55
58
|
.name('xvml')
|
|
56
59
|
.description('Renders .xvml files into deterministic self-contained HTML')
|
|
57
|
-
.version(
|
|
60
|
+
.version(version);
|
|
58
61
|
// xvml render <file> [--watch]
|
|
59
62
|
program
|
|
60
63
|
.command('render <file>')
|