@navikt/aksel
Version:
Aksel command line interface. Handles css-imports, codemods and more
29 lines (28 loc) • 1.35 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.darksideCommand = darksideCommand;
const chalk_1 = __importDefault(require("chalk"));
const commander_1 = require("commander");
const validation_js_1 = require("../codemod/validation.js");
// import figlet from "figlet";
// import { getMigrationString } from "./migrations.js";
const run_tooling_js_1 = require("./run-tooling.js");
const program = new commander_1.Command();
function darksideCommand() {
program.name(`${chalk_1.default.blueBright(`npx @navikt/aksel`)}`);
program
.option("-g, --glob [glob]", "Globbing pattern, overrides --ext! Run with 'noglob' if using zsh-terminal. ")
.option("-d, --dry-run", "Dry run, no changes will be made")
.option("-f, --force", "Forcibly run updates without checking git-changes")
.description("Update tool for darkside token updates");
program.parse();
const options = program.opts();
/* Makes sure that you don't migrate lots of files while having other uncommitted changes */
if (!options.force) {
(0, validation_js_1.validateGit)(options, program);
}
(0, run_tooling_js_1.runTooling)(options, program);
}