Skip to content

Commit

Permalink
Re-add initial examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sam3d committed Apr 13, 2020
1 parent 0ad49a9 commit 095b755
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
7 changes: 7 additions & 0 deletions example/assets/nuxt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions example/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
modules: [require("../lib/module")],
};
40 changes: 40 additions & 0 deletions example/pages/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<template>
<div class="root">
<h2>file-loader</h2>
<img src="~assets/nuxt.svg" />

<h2>url-loader</h2>
<img src="~assets/nuxt.svg?data" />

<h2>vue-svg-loader</h2>
<NuxtLogo />

<h2>raw-loader</h2>
<div v-html="rawNuxtLogo" />
</div>
</template>

<script>
import NuxtLogo from "~/assets/nuxt.svg?inline";
import rawNuxtLogo from "~/assets/nuxt.svg?raw";
export default {
components: { NuxtLogo },
data() {
return { rawNuxtLogo };
},
};
</script>

<style scoped>
.root {
font-family: sans-serif;
max-width: 300px;
margin: 0 auto;
}
h2:not(:first-of-type) {
margin-top: 50px;
}
</style>
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
],
"main": "lib/module.js",
"scripts": {
"dev": "nuxt dev example",
"format": "prettier --write '**/*.{js,json,vue}'"
},
"dependencies": {
Expand Down

0 comments on commit 095b755

Please sign in to comment.