Skip to content

chore: upgrade deps #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .env.example

This file was deleted.

1 change: 1 addition & 0 deletions .eslintcache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"/Users/jerome/Documents/projects/nuxt-netlify-functions-example/components/Example4.vue":"1"},{"size":1443,"mtime":1633421030647,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1shgw9g","/Users/jerome/Documents/projects/nuxt-netlify-functions-example/components/Example4.vue",[]]
36 changes: 5 additions & 31 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,19 @@ module.exports = {
env: {
browser: true,
node: true,
'cypress/globals': true
'cypress/globals': true,
},
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
extends: [
'eslint:recommended',
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'@nuxtjs',
'prettier',
'prettier/vue',
'plugin:prettier/recommended',
'plugin:nuxt/recommended'
'plugin:nuxt/recommended',
],
// required to lint *.vue files
plugins: ['prettier', 'cypress'],
// add your custom rules here
rules: {
semi: [2, 'never'],
'no-console': 'warn',
'no-debugger': 'warn',
'no-unused-vars': 'warn',
'vue/no-unused-components': 'warn',
'vue/max-attributes-per-line': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/component-name-in-template-casing': [
'warn',
'PascalCase',
{ ignores: ['nuxt', 'nuxt-link', 'no-ssr', 'component', 'transition'] }
],
'prettier/prettier': [
'error',
{
singleQuote: true,
semi: false,
endOfLine: 'auto'
}
]
}
'import/no-named-as-default': 'off',
},
}
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ name: End-to-end tests
on: [pull_request]
jobs:
cypress-run:
runs-on: ubuntu-16.04
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: 14.x
- name: Cypress run
uses: cypress-io/github-action@v1
uses: cypress-io/github-action@v2
env:
CYPRESS_baseUrl: 'https://deploy-preview-${{ github.event.number }}--nuxt-netlify-functions-example.netlify.app'
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ netlify-lambda-build
.env

.DS_store

.netlify
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.16.3
14
199 changes: 0 additions & 199 deletions .sass-lint.yml

This file was deleted.

3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ $ nvm use
# Install dependencies
$ yarn

# Build Nuxt app
$ yarn build

# Serve Nuxt app and Netlify functions at localhost:8888
$ netlify dev

Expand Down
76 changes: 38 additions & 38 deletions components/Example1.vue
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<script>
export default {
name: 'Example1',
data() {
return {
response: '—',
error: null,
}
},
methods: {
async helloWorld() {
try {
const res = await this.$axios.$get('/.netlify/functions/hello-world')
this.response = res
this.error = null
} catch (e) {
this.error = e.response
this.response = '—'
}
},
},
}
</script>
<template>
<div>
<h2>1. Hello, World!</h2>
<ElButton type="primary" data-cy="btn-hello-world" @click="helloWorld()"
>Hello</ElButton
>
<p>Response: {{ response }}</p>
<p v-if="error" style="color: red;">
<strong>Error {{ error.status }}</strong>
<br />
{{ error.data }}
</p>
</div>
</template>
<template>
<div>
<h2>1. Hello, World!</h2>
<ElButton type="primary" data-cy="btn-hello-world" @click="helloWorld()"
>Hello</ElButton
>
<p>Response: {{ response }}</p>
<p v-if="error" style="color: red">
<strong>Error {{ error.status }}</strong>
<br />
{{ error.data }}
</p>
</div>
</template>

<script>
export default {
name: 'Example1',
data() {
return {
response: '—',
error: null,
}
},
methods: {
async helloWorld() {
try {
const res = await this.$axios.$get('/.netlify/functions/hello-world')
this.response = res
this.error = null
} catch (e) {
this.error = e.response
this.response = '—'
}
},
},
}
</script>
Loading