mirror of
https://git.unlock-music.dev/um/um-react.git
synced 2024-11-23 20:02:16 +00:00
12 lines
453 B
JavaScript
12 lines
453 B
JavaScript
/* eslint-env node */
|
|
import { readFileSync, writeFileSync } from 'node:fs';
|
|
import { fileURLToPath } from 'node:url';
|
|
import { dirname } from 'node:path';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
|
|
const pkgJson = JSON.parse(readFileSync(__dirname + '/../package.json', 'utf-8'));
|
|
const pkgVer = (pkgJson.version ?? 'unknown') + '\n';
|
|
writeFileSync(__dirname + '/../dist/version.txt', pkgVer, 'utf-8');
|