UNPKG

dot-plop

Version:

A simple approach to PlopJS with first class TypeScript support and a one-line plopfile

23 lines 981 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const import_cwd_1 = __importDefault(require("import-cwd")); const autoDiscover_1 = require("./autoDiscover"); const paths_1 = require("./paths"); // Use the tsconfig in .plop const { compilerOptions: co1 = {} } = (import_cwd_1.default.silent(paths_1.tsconfig) || import_cwd_1.default.silent('./tsconfig.json') || {}); // Get the basic required compiler options const { compilerOptions: co2 } = require('../tsconfig.default.json'); // Setup node to handle typescript files require('ts-node').register({ // Overwrite any settings that might cause failure compilerOptions: { ...co1, ...co2 }, // It's just a plopfile, not production code transpileOnly: true, }); exports.default = autoDiscover_1.autoDiscover; //# sourceMappingURL=index.js.map