UNPKG

vuepress-plugin-social-share

Version:

Social sharing plugin for VuePress

21 lines (20 loc) 816 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const node_path_1 = require("node:path"); const utils_1 = require("./utils"); const SocialSharePlugin = (options = {}) => { const networksData = (0, utils_1.createNetworksData)(options); const socialShareOptions = Object.assign(Object.assign({}, options), { networksData }); return { name: 'social-share', enhanceAppFiles: (0, node_path_1.resolve)(__dirname, 'enhanceApp.js'), clientDynamicModules() { return { name: 'social-share.js', content: `export default ${JSON.stringify(socialShareOptions)}`, }; }, globalUIComponents: options.noGlobalSocialShare ? [] : ['GlobalSocialShare'], }; }; module.exports = SocialSharePlugin;