UNPKG

@nimbella/postman-api

Version:

Postman Collection to Nimbella Project: Take your APIs seamlessly into Serverless world with this API

33 lines (32 loc) 1.5 kB
"use strict"; /* * Copyright (c) 2019 - present Nimbella Corp. * * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.getCollectionDoc = exports.getReadMe = void 0; const path_1 = require("path"); const fs_1 = require("fs"); const Handlebars = require("handlebars"); const templateReadMeFile = fs_1.readFileSync(path_1.join(__dirname, '..', 'stub', 'templates', 'readme.hbs')); const templateReadMe = Handlebars.compile(templateReadMeFile.toString()); const templateCollectionDocFile = fs_1.readFileSync(path_1.join(__dirname, '..', 'stub', 'templates', 'collection.hbs')); const templateCollectionDoc = Handlebars.compile(templateCollectionDocFile.toString()); function getReadMe(description) { return templateReadMe({ description, }); } exports.getReadMe = getReadMe; function getCollectionDoc(meta) { return templateCollectionDoc(meta); } exports.getCollectionDoc = getCollectionDoc;