beathers
Version:
Beather is a lightweight SCSS library that serves as a comprehensive design system for your projects. It offers a structured and consistent approach to manage colors, fonts, and other design related variables, making it easier to maintain a cohesive visua
17 lines (16 loc) • 559 B
JavaScript
/* eslint-disable no-console */
import fs from 'fs-extra';
import { fileURLToPath } from 'node:url';
import path from 'path';
export function Version() {
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const packagePath = path.join(__dirname, '../../..', 'package.json');
try {
const packageInfo = fs.readJsonSync(packagePath);
console.log(`📦 \x1b[34mbeathers\x1b[0m v${packageInfo.version}`);
}
catch {
console.log('📦 \x1b[34mbeathers\x1b[0m CLI');
}
}