vuepress-plugin-copy-code1
Version:
Copy Code plugin for vuepress
26 lines • 921 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.copyCodePlugin = void 0;
const vuepress_shared_1 = require("vuepress-shared");
const path_1 = require("path");
const locales_1 = require("./locales");
const copyCodePlugin = (options, context) => {
const PLUGIN_NAME = "vuepress-plugin-copy-code1";
const userCopyCodeLocales = (0, vuepress_shared_1.getLocales)({
context,
name: PLUGIN_NAME,
config: options.locales,
default: locales_1.copyCodeLocales,
});
delete options.locales;
return {
name: "vuepress-plugin-copy-code1",
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