UNPKG

boats

Version:

Beautiful Open / Async Template System - Write less yaml with BOATS and Nunjucks.

13 lines (12 loc) 537 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const upath_1 = tslib_1.__importDefault(require("upath")); // eslint-disable-next-line @typescript-eslint/no-require-imports const packageJson = require(upath_1.default.join(process.cwd(), 'package.json')); exports.default = (attribute) => { if (typeof packageJson[attribute] === 'undefined') { throw new Error('Attribute not found in package.json file: ' + attribute); } return packageJson[attribute]; };