UNPKG

@curvenote/cli

Version:
30 lines (29 loc) 1.34 kB
import cliPlugins from '@curvenote/cli-plugin'; import extPerson from '@curvenote/ext-person'; import extTemplate from '@curvenote/ext-template'; import extBlog from '@curvenote/ext-blog'; import extLanding from '@curvenote/ext-landing'; import extFooter from '@curvenote/ext-footer'; import extScienceicons from '@scienceicons/myst'; export function combinePlugins(plugins) { return plugins.slice(1).reduce((base, next) => { var _a, _b, _c, _d, _e, _f, _g, _h; return ({ directives: [...((_a = base.directives) !== null && _a !== void 0 ? _a : []), ...((_b = next.directives) !== null && _b !== void 0 ? _b : [])], roles: [...((_c = base.roles) !== null && _c !== void 0 ? _c : []), ...((_d = next.roles) !== null && _d !== void 0 ? _d : [])], transforms: [...((_e = base.transforms) !== null && _e !== void 0 ? _e : []), ...((_f = next.transforms) !== null && _f !== void 0 ? _f : [])], checks: [...((_g = base.checks) !== null && _g !== void 0 ? _g : []), ...((_h = next.checks) !== null && _h !== void 0 ? _h : [])], }); }, plugins[0]); } export function getBuiltInPlugins() { return combinePlugins([ cliPlugins, extPerson, extTemplate, extBlog, extLanding, extScienceicons, extFooter, ]); }