UNPKG

gatsby-source-tilda

Version:

Gatsby source plugin for building websites using the tilda.cc CMS as a data source

23 lines (22 loc) 684 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.createPluginConfig = void 0; const tilda_1 = __importDefault(require("./api/tilda")); const defaultOptions = { secret: '', projectId: '', publicKey: '', exclude: [], }; const createPluginConfig = (pluginOptions) => { const { secret, publicKey } = pluginOptions; return { ...defaultOptions, ...pluginOptions, api: new tilda_1.default(publicKey, secret), }; }; exports.createPluginConfig = createPluginConfig;