import VueGist from './components/VueGist.vue' | |
export default { | |
name: 'vue-embed-gist', | |
props: ['gistId'], | |
render(h) { | |
return h(VueGist, { | |
props: { | |
gistId: this.gistId | |
} | |
}) | |
} | |
} |
import { mount } from 'vue-test-utils' | |
import VueEmbedGist from './' | |
test('it works', () => { | |
const wrapper = mount(VueEmbedGist) | |
expect(wrapper.isVueInstance()).toBe(true) | |
}) |
npm install --save vue-embed-gist |
<template> | |
<vue-embed-gist | |
gist-id="your gist id" | |
file="your file name"/> | |
</template> | |
<script> | |
import VueEmbedGist from 'vue-embed-gist' | |
export default { | |
components: { | |
VueEmbedGist | |
} | |
} | |
</script> |