1.5 KiB
1.5 KiB
home | title | icon | heroText | tagline | actions | footer | copyright | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
true | Home | home | vuepress-plugin-sass-palette | Sass palette plugin for VuePress2 |
|
Theme by <a href="https://theme-hope.vuejs.press" target="_blank">VuePress Theme Hope</a> | MIT Licensed, Copyright © 2019-present Mr.Hope | false |
How to use
Install
::: code-tabs#shell
@tab pnpm
pnpm add -D vuepress-plugin-sass-palette
@tab yarn
yarn add -D vuepress-plugin-sass-palette
@tab npm
npm i -D vuepress-plugin-sass-palette
:::
Usage
You must invoke useSassPalettePlugin
function during plugin initialization to use this plugin.
::: code-tabs#language
@tab TS
import { useSassPalettePlugin } from "vuepress-plugin-sass-palette";
import type { PluginFunction } from "vuepress/core";
export const yourPlugin =
(options): PluginFunction =>
(app) => {
useSassPalettePlugin(app, {
// plugin options
});
return {
// your plugin api
};
};
@tab JS
import { useSassPalettePlugin } from "vuepress-plugin-sass-palette";
export const yourPlugin = (options) => (app) => {
useSassPalettePlugin(app, {
// plugin options
});
return {
// your plugin api
};
};
:::