Skip to content
Permalink
Browse files

initial boilerplate

  • Loading branch information...
galvez committed Apr 28, 2019
1 parent 58284b9 commit 7e7ad828e5c027bbe15b987682adf4cbada4b602
Showing with 70 additions and 0 deletions.
  1. +5 −0 .eslintrc
  2. +4 −0 .gitignore
  3. +2 −0 api.js
  4. +2 −0 middleware/auth.js
  5. +3 −0 nuxt.config.js
  6. +17 −0 package.json
  7. +20 −0 pages/index.vue
  8. +14 −0 pages/protected.vue
  9. +3 −0 store/index.js
@@ -0,0 +1,5 @@
{
extends: [
'@nuxtjs'
]
}
@@ -0,0 +1,4 @@
.nuxt
node_modules
yarn-error.log
yarn.lock
2 api.js
@@ -0,0 +1,2 @@
export default [
]
@@ -0,0 +1,2 @@
export default function ({ store, route, redirect }) {
}
@@ -0,0 +1,3 @@
import serverMiddleware from './api'

export default { serverMiddleware }
@@ -0,0 +1,17 @@
{
"scripts": {
"lint": "eslint --fix --ext .js,.vue ."
},
"devDependencies": {
"@nuxtjs/eslint-config": "^0.0.1",
"eslint": "^5.16.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-jest": "^22.5.1",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^5.2.2",
"nuxt": "^2.6.3"
}
}
@@ -0,0 +1,20 @@
<template>
<div class="login">
<input
placeholder="Email"
:value="form.email"
>
<input
placeholder="Password"
:value="form.password"
>
<button @click="login">
Login
</button>
</div>
</template>

<script>
export default {
}
</script>
@@ -0,0 +1,14 @@
<template>
<div>
Hello, {{ user.name }}
</div>
</template>

<script>
import { mapState } from 'vuex'
export default {
middleware: 'auth',
computed: mapState(['user'])
}
</script>
@@ -0,0 +1,3 @@
export const state = () => ({

})

0 comments on commit 7e7ad82

Please sign in to comment.
You can’t perform that action at this time.