@mr-hope/vuepress-plugin-copy-code
Version:
Copy Code plugin for vuepress
20 lines • 807 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.copyCodePlugin = void 0;
const vuepress_shared_1 = require("@mr-hope/vuepress-shared");
const path_1 = require("path");
const locales_1 = require("./locales");
const copyCodePlugin = (options, context) => {
const userCopyCodeLocales = (0, vuepress_shared_1.getLocales)(context, locales_1.copyCodeLocales, options.locales);
delete options.locales;
return {
name: "@mr-hope/vuepress-plugin-copy-code",
define: () => ({
CODE_COPY_OPIONS: options,
CODE_COPY_LOCALES: userCopyCodeLocales,
}),
clientRootMixin: (0, path_1.resolve)(__dirname, "../client/clientRootMixin.js"),
};
};
exports.copyCodePlugin = copyCodePlugin;
//# sourceMappingURL=plugin.js.map