diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d09bc308..b4af7b96 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation. Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting ## Our Responsibilities @@ -68,9 +68,9 @@ members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +available at [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9f1ab7ba..8b17fe02 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,14 +7,14 @@ Please note we have a code of conduct, please follow it in all your interactions ## Pull Request Process -1. Ensure any install or build dependencies are removed before the end of the layer when doing a - build. -2. Update the README.md with details of changes to the interface, this includes new environment - variables, exposed ports, useful file locations and container parameters. -3. Increase the version numbers in any examples files and the README.md to the new version that this - Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). -4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you - do not have permission to do that, you may request the second reviewer to merge it for you. +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you + do not have permission to do that, you may request the second reviewer to merge it for you. ## Code of Conduct @@ -32,22 +32,22 @@ orientation. Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or -advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting ### Our Responsibilities @@ -89,4 +89,5 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org + [version]: http://contributor-covenant.org/version/1/4/ diff --git a/README.md b/README.md index 7e72f44f..cc3d307e 100644 --- a/README.md +++ b/README.md @@ -9,59 +9,65 @@ # This is currently a work in progress! -1. Install and activate the following required plugins, in your WordPress plugin directory: +1. Install and activate the following required plugins, in your WordPress plugin directory: -- [woocommerce](https://wordpress.org/plugins/woocommerce) Ecommerce for WordPress. -- [wp-graphql](https://wordpress.org/plugins/wp-graphql) Exposes GraphQL for WordPress. -- [wp-graphql-woocommerce](https://github.com/wp-graphql/wp-graphql-woocommerce) Adds WooCommerce functionality to a WPGraphQL schema. -- [algolia-woo-indexer](https://github.com/w3bdesign/algolia-woo-indexer) Sends WooCommerce products to Algolia. Required for search to work. -- [wp-graphql-cors](https://github.com/funkhaus/wp-graphql-cors) Ensures that CORS works correctly. Remember to add the domain to the store under `Extend "Access-Control-Allow-Origin” header` +- [woocommerce](https://wordpress.org/plugins/woocommerce) Ecommerce for WordPress. +- [wp-graphql](https://wordpress.org/plugins/wp-graphql) Exposes GraphQL for WordPress. +- [wp-graphql-woocommerce](https://github.com/wp-graphql/wp-graphql-woocommerce) Adds WooCommerce functionality to a WPGraphQL schema. +- [algolia-woo-indexer](https://github.com/w3bdesign/algolia-woo-indexer) Sends WooCommerce products to Algolia. Required for search to work. +- [wp-graphql-cors](https://github.com/funkhaus/wp-graphql-cors) Ensures that CORS works correctly. Remember to add the domain to the store under `Extend "Access-Control-Allow-Origin” header` Optional plugin: -- [headless-wordpress](https://github.com/w3bdesign/headless-wp) Disables the frontend so only the backend is accessible. (optional) +- [headless-wordpress](https://github.com/w3bdesign/headless-wp) Disables the frontend so only the backend is accessible. (optional) The current release has been tested and is confirmed working with the following versions: -- WordPress version 5.6.0 -- WooCommerce version 4.9.0 -- WP GraphQL version 1.1.2 -- WooGraphQL version 0.6.1 (latest development version) -- WPGraphQL CORS version 1.1.0 (with introspection enabled) +- WordPress version 5.6.0 +- WooCommerce version 4.9.0 +- WP GraphQL version 1.1.2 +- WooGraphQL version 0.6.1 (latest development version) +- WPGraphQL CORS version 1.1.0 (with introspection enabled) -2. For debugging and testing, install either: +2. For debugging and testing, install either: - https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/ (Firefox) + (Firefox) - https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm (Chrome) + (Chrome) - Rename .env.example to .env so the Apollo debugger will correctly load. It will not load if the NODE_ENV variable is not correctly set. + Rename .env.example to .env so the Apollo debugger will correctly load. It will not load if the NODE_ENV variable is not correctly set. -3. Make sure WooCommerce has some products already or import some sample products +3. Make sure WooCommerce has some products already or import some sample products - The WooCommerce sample products CSV file is available at `wp-content/plugins/woocommerce/sample-data/sample_products.csv` or [Sample products](sample_products/) + The WooCommerce sample products CSV file is available at `wp-content/plugins/woocommerce/sample-data/sample_products.csv` or [Sample products](sample_products/) - Import the products at `WP Dashboard > Tools > Import > WooCommerce products(CSV)` + Import the products at `WP Dashboard > Tools > Import > WooCommerce products(CSV)` -4. Clone or fork the repo and modify `.env` with the URL to the GraphQL endpoint (or set environment variables in the configuration UI for your deployment solution) -5. Start the server with `npm run dev` -6. Enable COD (Cash On Demand) payment method in WooCommerce -7. Add a product to the cart -8. Proceed to checkout -9. Fill in your details and place the order +4. Clone or fork the repo and modify `.env` with the URL to the GraphQL endpoint (or set environment variables in the configuration UI for your deployment solution) + +5. Start the server with `npm run dev` + +6. Enable COD (Cash On Demand) payment method in WooCommerce + +7. Add a product to the cart + +8. Proceed to checkout + +9. Fill in your details and place the order ## Features -- NuxtJS -- Tailwind CSS -- Vue Apollo with GraphQL Codegen -- Responsive design -- Support for simple products -- GraphQL-based filters -- CSS animations and transitions -- Form handling and validation with Vue Formulate -- Checkout process -- Animated mobile menu +- NuxtJS +- Tailwind CSS +- Vue Apollo with GraphQL Codegen +- Vue Awesome Swiper for image slider on frontpage +- Responsive design +- Support for simple products +- GraphQL-based filters +- CSS animations and transitions +- Form handling and validation with Vue Formulate +- Checkout process +- Animated mobile menu ## Troubleshooting @@ -75,7 +81,7 @@ Check the attributes of the products. Right now the application requires Size an ## TODO -- Look into variable product support -- Make WooCommerce session token expire and get deleted after 24 hours -- Finish implementing Algolia search -- Make Algolia look good on mobile +- Look into variable product support +- Make WooCommerce session token expire and get deleted after 24 hours +- Finish implementing Algolia search +- Make Algolia look good on mobile diff --git a/assets/images/Hero.jpg b/assets/images/Hero.jpg index 1d38ea6a..e314ed13 100644 Binary files a/assets/images/Hero.jpg and b/assets/images/Hero.jpg differ diff --git a/assets/images/Hero2.jpg b/assets/images/Hero2.jpg new file mode 100644 index 00000000..8b9785e6 Binary files /dev/null and b/assets/images/Hero2.jpg differ diff --git a/assets/images/samantha-gades-gKjLLN1T8HQ-unsplash.jpg b/assets/images/samantha-gades-gKjLLN1T8HQ-unsplash.jpg new file mode 100644 index 00000000..9195b7b8 Binary files /dev/null and b/assets/images/samantha-gades-gKjLLN1T8HQ-unsplash.jpg differ diff --git a/components/Cart/ShowCartContents.vue b/components/Cart/ShowCartContents.vue index f547596c..123b1085 100644 --- a/components/Cart/ShowCartContents.vue +++ b/components/Cart/ShowCartContents.vue @@ -79,7 +79,7 @@ export default { result({ data, loading, networkStatus }) { const cartIsReady = data && networkStatus === 7 - if (cartIsReady) { + if (cartIsReady && !loading) { this.loading = false this.remoteCart = data this.subTotal = data.cart.total @@ -118,7 +118,7 @@ export default { }, }, }) - .then(({ data }) => { + .then(() => { this.removingCartItem = false this.$apollo.queries.cart.refetch() }) diff --git a/components/Header/Cart.vue b/components/Header/Cart.vue index dad97b73..9d99296d 100644 --- a/components/Header/Cart.vue +++ b/components/Header/Cart.vue @@ -52,7 +52,7 @@ export default { pollInterval: process.server ? undefined : 2000, result({ data, loading, networkStatus }) { const cartIsReady = networkStatus === 7 - if (cartIsReady) { + if (cartIsReady && !loading) { this.remoteCart = data this.subTotal = data.cart.total this.cartLength = data.cart.contents.nodes.reduce( @@ -71,7 +71,7 @@ export default { // Check if we are in the browser before checking localStorage // Will refresh the page to refetch the session from WooCommerce if (process.browser && !localStorage.getItem('woo-session')) { - window.location.reload(true) + this.$router.push({ path: '/', force: true }) } }, }, diff --git a/components/Index/Hero.vue b/components/Index/Hero.vue index 174ff733..eb451c09 100644 --- a/components/Index/Hero.vue +++ b/components/Index/Hero.vue @@ -1,30 +1,78 @@ diff --git a/nuxt.config.js b/nuxt.config.js index 75736133..4db28d02 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -13,7 +13,7 @@ export default { }, // Global page headers (https://go.nuxtjs.dev/config-head) head: { - title: 'nuxtjs-woocommerce', + title: 'NuxtJS WooCommerce', meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, @@ -26,7 +26,10 @@ export default { css: ['@/assets/css/animate.min.css'], // Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins) - plugins: ['~/plugins/vue-formulate'], + plugins: [ + '~/plugins/vue-formulate', + { src: '~/plugins/vue-awesome-swiper', mode: 'client', ssr: false }, + ], // Auto import components (https://go.nuxtjs.dev/config-components) components: true, diff --git a/package-lock.json b/package-lock.json index b31b1b93..651fb59d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nuxtjs-woocommerce", - "version": "1.0.16", + "version": "1.0.17", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1468,14 +1468,6 @@ } } }, - "@fullhuman/postcss-purgecss": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@fullhuman/postcss-purgecss/-/postcss-purgecss-3.1.3.tgz", - "integrity": "sha512-kwOXw8fZ0Lt1QmeOOrd+o4Ibvp4UTEBFQbzvWldjlKv5n+G9sXfIPn1hh63IQIL8K8vbvv1oYMJiIUbuy9bGaA==", - "requires": { - "purgecss": "^3.1.3" - } - }, "@graphql-codegen/cli": { "version": "1.20.1", "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-1.20.1.tgz", @@ -5202,9 +5194,9 @@ "optional": true }, "@vue/test-utils": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.1.2.tgz", - "integrity": "sha512-utbIL7zn9c+SjhybPwh48lpWCiluFCbP1yyRNAy1fQsw/6hiNFioaWy05FoVAFIZXC5WwBf+5r4ypfM1j/nI4A==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-1.1.3.tgz", + "integrity": "sha512-BAY1Cwe9JpkJseimC295EW3YlAmgIJI9OPkg2FSP62+PHZooB0B+wceDi9TYyU57oqzL0yLbcP73JKFpKiLc9A==", "dev": true, "requires": { "dom-event-types": "^1.0.0", @@ -9138,6 +9130,14 @@ } } }, + "dom7": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dom7/-/dom7-3.0.0.tgz", + "integrity": "sha512-oNlcUdHsC4zb7Msx7JN3K0Nro1dzJ48knvBOnDPKJ2GV9wl1i5vydJZUSyOfrkKFDZEud/jBsTk92S/VGSAe/g==", + "requires": { + "ssr-window": "^3.0.0-alpha.1" + } + }, "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", @@ -10104,25 +10104,6 @@ "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==" }, - "espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", - "dev": true, - "requires": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -16898,39 +16879,6 @@ "escape-goat": "^2.0.0" } }, - "purgecss": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-3.1.3.tgz", - "integrity": "sha512-hRSLN9mguJ2lzlIQtW4qmPS2kh6oMnA9RxdIYK8sz18QYqd6ePp4GNDl18oWHA1f2v2NEQIh51CO8s/E3YGckQ==", - "requires": { - "commander": "^6.0.0", - "glob": "^7.0.0", - "postcss": "^8.2.1", - "postcss-selector-parser": "^6.0.2" - }, - "dependencies": { - "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" - }, - "nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==" - }, - "postcss": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.4.tgz", - "integrity": "sha512-kRFftRoExRVXZlwUuay9iC824qmXPcQQVzAjbCCgjpXnkdMCJYBu2gTwAaFBzv8ewND6O8xFb3aELmEkh9zTzg==", - "requires": { - "colorette": "^1.2.1", - "nanoid": "^3.1.20", - "source-map": "^0.6.1" - } - } - } - }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -18387,6 +18335,11 @@ "tweetnacl": "~0.14.0" } }, + "ssr-window": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-3.0.0.tgz", + "integrity": "sha512-q+8UfWDg9Itrg0yWK7oe5p/XRCJpJF9OBtXfOPgSJl+u3Xd5KI328RUEvUqSMVM9CiQUEf1QdBzJMkYGErj9QA==" + }, "ssri": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/ssri/-/ssri-7.1.0.tgz", @@ -18924,6 +18877,15 @@ } } }, + "swiper": { + "version": "6.4.10", + "resolved": "https://registry.npmjs.org/swiper/-/swiper-6.4.10.tgz", + "integrity": "sha512-uNTdbkcVjNQVOwXhr+e8rTB4Uu8QfWHaZQSSptykWJX/QjSBuAPxAUFnHG8IKGQfTljGol9eLv6g8KTwvGjYNA==", + "requires": { + "dom7": "^3.0.0", + "ssr-window": "^3.0.0" + } + }, "symbol-observable": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", @@ -19074,6 +19036,19 @@ "resolve": "^1.19.0" }, "dependencies": { + "@fullhuman/postcss-purgecss": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@fullhuman/postcss-purgecss/-/postcss-purgecss-3.1.3.tgz", + "integrity": "sha512-kwOXw8fZ0Lt1QmeOOrd+o4Ibvp4UTEBFQbzvWldjlKv5n+G9sXfIPn1hh63IQIL8K8vbvv1oYMJiIUbuy9bGaA==", + "requires": { + "purgecss": "^3.1.3" + } + }, + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" + }, "fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -19099,11 +19074,39 @@ "universalify": "^2.0.0" } }, + "nanoid": { + "version": "3.1.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", + "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==" + }, "postcss-value-parser": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==" }, + "purgecss": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-3.1.3.tgz", + "integrity": "sha512-hRSLN9mguJ2lzlIQtW4qmPS2kh6oMnA9RxdIYK8sz18QYqd6ePp4GNDl18oWHA1f2v2NEQIh51CO8s/E3YGckQ==", + "requires": { + "commander": "^6.0.0", + "glob": "^7.0.0", + "postcss": "^8.2.1", + "postcss-selector-parser": "^6.0.2" + }, + "dependencies": { + "postcss": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.4.tgz", + "integrity": "sha512-kRFftRoExRVXZlwUuay9iC824qmXPcQQVzAjbCCgjpXnkdMCJYBu2gTwAaFBzv8ewND6O8xFb3aELmEkh9zTzg==", + "requires": { + "colorette": "^1.2.1", + "nanoid": "^3.1.20", + "source-map": "^0.6.1" + } + } + } + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -20031,6 +20034,11 @@ } } }, + "vue-awesome-swiper": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/vue-awesome-swiper/-/vue-awesome-swiper-4.1.1.tgz", + "integrity": "sha512-50um10t6N+lJaORkpwSi1wWuMmBI1sgFc9Znsi5oUykw2cO5DzLaBHcO2JNX21R+Ue4TGoIJDhhxjBHtkFrTEQ==" + }, "vue-cli-plugin-apollo": { "version": "0.22.2", "resolved": "https://registry.npmjs.org/vue-cli-plugin-apollo/-/vue-cli-plugin-apollo-0.22.2.tgz", @@ -20145,6 +20153,17 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } } } }, diff --git a/package.json b/package.json index 1accd23a..c82ee4ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nuxtjs-woocommerce", - "version": "1.0.16", + "version": "1.0.17", "private": true, "scripts": { "dev": "nuxt", @@ -21,9 +21,11 @@ "core-js": "^3.8.3", "graphql-tag": "^2.11.0", "nuxt": "^2.14.12", + "swiper": "^6.4.10", "tailwindcss": "npm:@tailwindcss/postcss7-compat@2.0.2", "uid": "^2.0.0", "vue": "^2.6.12", + "vue-awesome-swiper": "^4.1.1", "vue-instantsearch": "^3.4.3", "vue-server-renderer": "^2.6.12", "vue-template-compiler": "^2.6.12" @@ -35,7 +37,7 @@ "@nuxtjs/eslint-config": "^5.0.0", "@nuxtjs/eslint-module": "3.0.2", "@nuxtjs/tailwindcss": "^3.4.2", - "@vue/test-utils": "^1.1.2", + "@vue/test-utils": "^1.1.3", "babel-core": "7.0.0-bridge.0", "babel-eslint": "^10.1.0", "babel-jest": "^26.6.3", diff --git a/plugins/vue-awesome-swiper.js b/plugins/vue-awesome-swiper.js new file mode 100644 index 00000000..e6917c5c --- /dev/null +++ b/plugins/vue-awesome-swiper.js @@ -0,0 +1,7 @@ +// https://github.com/surmon-china/vue-awesome-swiper + +import Vue from 'vue' +// import VueAwesomeSwiper from 'vue-awesome-swiper/dist/ssr' +import VueAwesomeSwiper from 'vue-awesome-swiper' + +Vue.use(VueAwesomeSwiper)