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
29 lines (28 loc) • 1.14 kB
JavaScript
/* eslint-disable no-console */
import { AddColors, AddFont, Build, Help, ImportColor, ImportColorPack, ImportFont, Init, RemoveColor, RemoveFont, Version, } from '../commands/index.js';
const commands = {
'--help': () => Help(),
'-v': () => Version(),
'--version': () => Version(),
init: async () => await Init(),
'build:pack': async () => await Build(),
'add-font': async () => await AddFont(),
'remove-font': async () => await RemoveFont(),
'import-font-sample': async () => await ImportFont(),
'add-colors': async () => await AddColors(),
'remove-color': async () => await RemoveColor(),
'import-color-pack': async () => await ImportColorPack(),
'import-color': async () => await ImportColor(),
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function Commands(args) {
const list = {
...commands,
default: () => {
console.error(`❌ Command not found: "${args[0]}"`);
console.log('💡 Run "\x1b[34mbeathers --help\x1b[0m" to see all available commands.');
process.exit(1);
},
};
return list;
}