Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 750f509

Browse files
authored
Merge pull request #25 from wearelucid/develop
2 parents 3c52cf6 + 2830448 commit 750f509

31 files changed

+6547
-7104
lines changed

‎.env.example‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎.eslintcache‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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",[]]

‎.eslintrc.js‎

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,19 @@ module.exports = {
33
env: {
44
browser: true,
55
node: true,
6-
'cypress/globals': true
6+
'cypress/globals': true,
77
},
88
parserOptions: {
99
parser: 'babel-eslint',
10-
sourceType: 'module'
1110
},
1211
extends: [
13-
'eslint:recommended',
14-
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
15-
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
1612
'@nuxtjs',
17-
'prettier',
18-
'prettier/vue',
1913
'plugin:prettier/recommended',
20-
'plugin:nuxt/recommended'
14+
'plugin:nuxt/recommended',
2115
],
22-
// required to lint *.vue files
2316
plugins: ['prettier', 'cypress'],
17+
// add your custom rules here
2418
rules: {
25-
semi: [2, 'never'],
26-
'no-console': 'warn',
27-
'no-debugger': 'warn',
28-
'no-unused-vars': 'warn',
29-
'vue/no-unused-components': 'warn',
30-
'vue/max-attributes-per-line': 'off',
31-
'vue/singleline-html-element-content-newline': 'off',
32-
'vue/multiline-html-element-content-newline': 'off',
33-
'vue/component-name-in-template-casing': [
34-
'warn',
35-
'PascalCase',
36-
{ ignores: ['nuxt', 'nuxt-link', 'no-ssr', 'component', 'transition'] }
37-
],
38-
'prettier/prettier': [
39-
'error',
40-
{
41-
singleQuote: true,
42-
semi: false,
43-
endOfLine: 'auto'
44-
}
45-
]
46-
}
19+
'import/no-named-as-default': 'off',
20+
},
4721
}

‎.github/workflows/main.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: End-to-end tests
22
on: [pull_request]
33
jobs:
44
cypress-run:
5-
runs-on: ubuntu-16.04
5+
runs-on: ubuntu-20.04
66
steps:
77
- name: Checkout
8-
uses: actions/checkout@v1
9-
- name: Use Node.js 12.x
10-
uses: actions/setup-node@v1
8+
uses: actions/checkout@v2
9+
- name: Use Node.js 14.x
10+
uses: actions/setup-node@v2
1111
with:
12-
node-version: 12.x
12+
node-version: 14.x
1313
- name: Cypress run
14-
uses: cypress-io/github-action@v1
14+
uses: cypress-io/github-action@v2
1515
env:
1616
CYPRESS_baseUrl: 'https://deploy-preview-${{ github.event.number }}--nuxt-netlify-functions-example.netlify.app'
1717
with:

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ netlify-lambda-build
1616
.env
1717

1818
.DS_store
19+
20+
.netlify

‎.nvmrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12.16.3
1+
14

‎.sass-lint.yml‎

Lines changed: 0 additions & 199 deletions
This file was deleted.

‎README.md‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ $ nvm use
2626
# Install dependencies
2727
$ yarn
2828

29-
# Build Nuxt app
30-
$ yarn build
31-
3229
# Serve Nuxt app and Netlify functions at localhost:8888
3330
$ netlify dev
3431

‎components/Example1.vue‎

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
<script>
2-
exportdefault {
3-
name:'Example1',
4-
data() {
5-
return {
6-
response:'',
7-
error:null,
8-
}
9-
},
10-
methods: {
11-
asynchelloWorld() {
12-
try {
13-
constres=awaitthis.$axios.$get('/.netlify/functions/hello-world')
14-
this.response= res
15-
this.error=null
16-
} catch (e) {
17-
this.error=e.response
18-
this.response=''
19-
}
20-
},
21-
},
22-
}
23-
</script>
24-
25-
<template>
26-
<div>
27-
<h2>1. Hello, World!</h2>
28-
<ElButtontype="primary"data-cy="btn-hello-world"@click="helloWorld()"
29-
>Hello</ElButton
30-
>
31-
<p>Response: {{ response }}</p>
32-
<pv-if="error"style="color: red;">
33-
<strong>Error {{ error.status }}</strong>
34-
<br />
35-
{{ error.data }}
36-
</p>
37-
</div>
38-
</template>
1+
<template>
2+
<div>
3+
<h2>1. Hello, World!</h2>
4+
<ElButtontype="primary"data-cy="btn-hello-world"@click="helloWorld()"
5+
>Hello</ElButton
6+
>
7+
<p>Response: {{ response }}</p>
8+
<pv-if="error"style="color: red">
9+
<strong>Error {{ error.status }}</strong>
10+
<br />
11+
{{ error.data }}
12+
</p>
13+
</div>
14+
</template>
15+
16+
<script>
17+
exportdefault {
18+
name:'Example1',
19+
data() {
20+
return {
21+
response:'',
22+
error:null,
23+
}
24+
},
25+
methods: {
26+
asynchelloWorld() {
27+
try {
28+
constres=awaitthis.$axios.$get('/.netlify/functions/hello-world')
29+
this.response= res
30+
this.error=null
31+
} catch (e) {
32+
this.error=e.response
33+
this.response=''
34+
}
35+
},
36+
},
37+
}
38+
</script>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /