@vuepress-denaro/vuepress-plugin-moefy-canvas
Version:
Decorate your web pages with lovely canvas animations.用可可爱爱的 canvas 动效装饰你的网页.
17 lines (16 loc) • 628 B
JavaScript
import { useDenaroPlugin } from '@vuepress-denaro/core';
import { MoefyCanvasTheme } from '../shared/index.js';
import { DIR_NAME, PLUGIN_NAME } from './utils.js';
export const moefyCanvasPlugin = (options) => useDenaroPlugin(() => {
const { theme = MoefyCanvasTheme.Sparkler, themeConfig = {}, canvasOptions = {}, } = options || {};
return {
name: PLUGIN_NAME,
dirname: DIR_NAME,
useClientConfig: true,
define: {
__MOEFY_CANVAS_THEME__: theme,
__MOEFY_CANVAS_THEME_CONFIG__: themeConfig,
__MOEFY_CANVAS_OPTIONS__: canvasOptions,
},
};
});