Skip to content

Instantly share code, notes, and snippets.

@hypeJunction
Last active April 18, 2019 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hypeJunction/91bef9a1abb05fd80f237a47d8ae41d0 to your computer and use it in GitHub Desktop.
Save hypeJunction/91bef9a1abb05fd80f237a47d8ae41d0 to your computer and use it in GitHub Desktop.
export default (
{
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData, // site metadata
},
) => {
Vue.component('codemirror', async () => {
// This module will export a function configuring codemirror component
const install = await import('./codemirror.js');
// Here you can import all other extensions you need
// These can as well go into ./codemirror.js
await import('../../node_modules/codemirror/mode/htmlmixed/htmlmixed.js');
await import('../../node_modules/codemirror/mode/vue/vue.js');
return install.default({
// You can specific configuration options and events here
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment