placeholder-craft-cli
Version:
a cli tool to generate placeholder images
43 lines (42 loc) • 1.1 kB
JavaScript
#!/usr/bin/env node
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const yargs_1 = __importDefault(require("yargs"));
const createPlaceholderImage_1 = require("./createPlaceholderImage");
const argv = yargs_1.default
.option("width", {
alias: "w",
describe: "The width of the image",
type: "number",
demandOption: true,
})
.option("height", {
alias: "h",
describe: "The height of the image",
type: "number",
demandOption: true,
})
.option("bgColor", {
alias: "b",
describe: "Background color",
type: "string",
default: "grey",
})
.option("textColor", {
alias: "t",
describe: "Text color",
type: "string",
default: "white",
})
.option("filename", {
alias: "f",
describe: "The output filename",
type: "string",
default: "placeholder.png",
})
.help()
.parseSync();
(0, createPlaceholderImage_1.createPlaceholderImage)(argv);