@micro-app/plugin-vuepress
Version:
[Plugin] adapter vuepress plugin.
14 lines (13 loc) • 437 B
JavaScript
export default function({ Vue, isServer }) {
if (isServer) {
Vue.prototype.$scroll = {};
Vue.prototype.$scrollReveal = () => {};
} else {
const ScrollReveal = require('scrollreveal').default;
const scrollReveal = ScrollReveal({
reset: true,
});
Vue.prototype.$scroll = scrollReveal;
Vue.prototype.$scrollReveal = scrollReveal.reveal.bind(scrollReveal);
}
}