gatsby-source-roamresearch
Version:
Source plugin for pulling data into Gatsby from Roam Research
22 lines (21 loc) • 724 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.onPreBoostrap = void 0;
const onPreBoostrap = ({ reporter }, options) => {
const { url, email, password } = options || {};
const errors = [];
if (typeof url !== "string") {
errors.push("`url` option needs to be a string");
}
if (typeof email !== "string") {
errors.push("`email` option needs to be a string");
}
if (typeof password !== "string") {
errors.push("`password` option needs to be a string");
}
if (errors.length) {
reporter.panic(`Problems with gatsby-source-roamresearch plugin options:
${errors.join("\n")}`);
}
};
exports.onPreBoostrap = onPreBoostrap;