Skip to content

Commit 93cf616

Browse files
authored
Merge pull request #962 from w3bdesign/958-nuxt-3
958 nuxt 3
2 parents ece0349 + 65f5779 commit 93cf616

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+12674
-7
lines changed
File renamed without changes.

components/Layout/MobileMenu.vue

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,23 @@
1010
>
1111
<ul>
1212
<li class="text-xl linkStyle">
13-
<NuxtLink to="/" @click.native="displayMobileMenu"> Home </NuxtLink>
13+
<NuxtLink to="/" @click="displayMobileMenu"> Home </NuxtLink>
1414
</li>
1515
<li class="text-xl linkStyle">
16-
<NuxtLink to="/products" @click.native="displayMobileMenu">
16+
<NuxtLink to="/products" @click="displayMobileMenu">
1717
Products
1818
</NuxtLink>
1919
</li>
2020
<li class="text-xl linkStyle">
21-
<NuxtLink to="/categories" @click.native="displayMobileMenu">
21+
<NuxtLink to="/categories" @click="displayMobileMenu">
2222
Categories
2323
</NuxtLink>
2424
</li>
2525
<li class="text-xl linkStyle">
26-
<NuxtLink to="/search" @click.native="displayMobileMenu">
27-
Search
28-
</NuxtLink>
26+
<NuxtLink to="/search" @click="displayMobileMenu"> Search </NuxtLink>
2927
</li>
3028
<li class="flex justify-center mt-6 text-lg linkStyleCart">
31-
<NuxtLink to="/cart" @click.native="displayMobileMenu">
29+
<NuxtLink to="/cart" @click="displayMobileMenu">
3230
<LayoutCart />
3331
</NuxtLink>
3432
</li>

nuxt3/.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
NODE_ENV="development"
2+
PUBLIC_GRAPHQL_URL = "change me"
3+
PLACEHOLDER_SMALL_IMAGE_URL = "change me"
4+
ALGOLIA_APPLICATION_ID = "change me"
5+
ALGOLIA_API_KEY = "change me"
6+
ALGOLIA_INDEX_NAME = "change me"

nuxt3/.eslintrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 2022,
4+
"sourceType": "module"
5+
},
6+
"extends": ["plugin:prettier/recommended"],
7+
"plugins": ["prettier"],
8+
"rules": {
9+
"no-undef": "off"
10+
}
11+
}

nuxt3/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
*.log*
3+
.nuxt
4+
.nitro
5+
.cache
6+
.output
7+
.env
8+
dist

nuxt3/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shamefully-hoist=true
2+
strict-peer-dependencies=false

nuxt3/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Nuxt 3 Minimal Starter
2+
3+
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
4+
5+
## Setup
6+
7+
Make sure to install the dependencies:
8+
9+
```bash
10+
# yarn
11+
yarn install
12+
13+
# npm
14+
npm install
15+
16+
# pnpm
17+
pnpm install
18+
```
19+
20+
## Development Server
21+
22+
Start the development server on http://localhost:3000
23+
24+
```bash
25+
npm run dev
26+
```
27+
28+
## Production
29+
30+
Build the application for production:
31+
32+
```bash
33+
npm run build
34+
```
35+
36+
Locally preview production build:
37+
38+
```bash
39+
npm run preview
40+
```
41+
42+
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
mutation($input: AddToCartInput!) {
2+
addToCart(input: $input) {
3+
cartItem {
4+
key
5+
product {
6+
id
7+
databaseId
8+
name
9+
description
10+
type
11+
onSale
12+
slug
13+
averageRating
14+
reviewCount
15+
image {
16+
id
17+
sourceUrl
18+
altText
19+
}
20+
galleryImages {
21+
nodes {
22+
id
23+
sourceUrl
24+
altText
25+
}
26+
}
27+
}
28+
variation {
29+
id
30+
databaseId
31+
name
32+
description
33+
type
34+
onSale
35+
price
36+
regularPrice
37+
salePrice
38+
image {
39+
id
40+
sourceUrl
41+
altText
42+
}
43+
attributes {
44+
nodes {
45+
id
46+
attributeId
47+
name
48+
value
49+
}
50+
}
51+
}
52+
quantity
53+
total
54+
subtotal
55+
subtotalTax
56+
}
57+
}
58+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
mutation CHECKOUT_MUTATION($input: CheckoutInput!) {
2+
checkout(input: $input) {
3+
result
4+
redirect
5+
}
6+
}
7+
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
mutation($input: UpdateItemQuantitiesInput!) {
2+
updateItemQuantities(input: $input) {
3+
items {
4+
key
5+
product {
6+
id
7+
databaseId
8+
name
9+
description
10+
type
11+
onSale
12+
slug
13+
averageRating
14+
reviewCount
15+
image {
16+
id
17+
sourceUrl
18+
altText
19+
}
20+
galleryImages {
21+
nodes {
22+
id
23+
sourceUrl
24+
altText
25+
}
26+
}
27+
}
28+
variation {
29+
id
30+
databaseId
31+
name
32+
description
33+
type
34+
onSale
35+
price
36+
regularPrice
37+
salePrice
38+
image {
39+
id
40+
sourceUrl
41+
altText
42+
}
43+
attributes {
44+
nodes {
45+
id
46+
attributeId
47+
name
48+
value
49+
}
50+
}
51+
}
52+
quantity
53+
total
54+
subtotal
55+
subtotalTax
56+
}
57+
removed {
58+
key
59+
product {
60+
id
61+
databaseId
62+
}
63+
variation {
64+
id
65+
databaseId
66+
}
67+
}
68+
updated {
69+
key
70+
product {
71+
id
72+
databaseId
73+
}
74+
variation {
75+
id
76+
databaseId
77+
}
78+
}
79+
}
80+
}

0 commit comments

Comments
 (0)