@flotiq/flotiq-astro-sdk
Version:
Astro collection generator for connecting with Flotiq CMS
29 lines (28 loc) • 1.49 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
const dotenv_flow_1 = __importDefault(require("dotenv-flow"));
const yargs_1 = __importDefault(require("yargs"));
const helpers_1 = require("yargs/helpers");
dotenv_flow_1.default.config();
const parser = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv)).commandDir("./commands", {
extensions: process.env.NODE_ENV === "development" || ((_a = process.argv[1]) === null || _a === void 0 ? void 0 : _a.endsWith(".ts"))
? ["js", "ts"]
: ["js"],
});
(() => __awaiter(void 0, void 0, void 0, function* () {
yield parser.parse();
}))();