Last active
April 20, 2018 08:47
-
-
Save sudhanshu-15/8bab656a910829ab9c32d7700c570be6 to your computer and use it in GitHub Desktop.
Example gist for vue-embed-gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import VueGist from './components/VueGist.vue' | |
export default { | |
name: 'vue-embed-gist', | |
props: ['gistId'], | |
render(h) { | |
return h(VueGist, { | |
props: { | |
gistId: this.gistId | |
} | |
}) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { mount } from 'vue-test-utils' | |
import VueEmbedGist from './' | |
test('it works', () => { | |
const wrapper = mount(VueEmbedGist) | |
expect(wrapper.isVueInstance()).toBe(true) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install --save vue-embed-gist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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