Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-auckland committed Mar 14, 2021
0 parents commit ac07a59
Show file tree
Hide file tree
Showing 10 changed files with 1,777 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
1,661 changes: 1,661 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "vue2-vite",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
},
"dependencies": {
"vite-plugin-vue2": "^1.4.0",
"vue": "^2.6.12"
},
"devDependencies": {
"vite": "^2.0.5"
}
}
Binary file added public/favicon.ico
Binary file not shown.
29 changes: 29 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<template>
<div id="app">
<img
alt="Vue logo"
src="./assets/logo.png"
/>
<HelloWorld msg="Hello Vue 2 + Vite" />
</div>
</template>

<script>
import HelloWorld from "./components/HelloWorld.vue";
export default {
components: {
HelloWorld,
},
};
</script>

<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
Binary file added src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<template>
<div>

<h1>{{ msg }}</h1>

<p>
<a
href="https://vitejs.dev/guide/features.html"
target="_blank"
>Vite Documentation</a> |
<a
href="https://vuejs.org/v2/guide/"
target="_blank"
>Vue 2 Documentation</a>
</p>

<button @click="state.count++">count is: {{ count }}</button>
<p>
Edit
<code>components/HelloWorld.vue</code> to test hot module replacement.
</p>
</div>
</template>

<script>
export default {
props: {
msg: String,
},
data() {
return {
count: 0,
};
},
};
</script>

<style scoped>
a {
color: #42b983;
}
</style>
6 changes: 6 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Vue from 'vue';
import App from './App.vue';

new Vue({
render: (h) => h(App),
}).$mount('#app');
5 changes: 5 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const { createVuePlugin } = require('vite-plugin-vue2');

module.exports = {
plugins: [createVuePlugin()],
};

0 comments on commit ac07a59

Please sign in to comment.