Skip to content

Instantly share code, notes, and snippets.

@sudhanshu-15
Last active April 20, 2018 08:47
Show Gist options
  • Save sudhanshu-15/8bab656a910829ab9c32d7700c570be6 to your computer and use it in GitHub Desktop.
Save sudhanshu-15/8bab656a910829ab9c32d7700c570be6 to your computer and use it in GitHub Desktop.
Example gist for vue-embed-gist
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment