14 |
15 |
24 |
25 |
30 |
--------------------------------------------------------------------------------
/layouts/README.md:
--------------------------------------------------------------------------------
1 | # LAYOUTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Application Layouts.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
8 |
--------------------------------------------------------------------------------
/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
19 |
75 |
--------------------------------------------------------------------------------
/middleware/README.md:
--------------------------------------------------------------------------------
1 | # MIDDLEWARE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your application middleware.
6 | Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
7 |
8 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
9 |
--------------------------------------------------------------------------------
/nuxt.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | /*
3 | ** Nuxt rendering mode
4 | ** See https://nuxtjs.org/api/configuration-mode
5 | */
6 | mode: 'universal',
7 | /*
8 | ** Nuxt target
9 | ** See https://nuxtjs.org/api/configuration-target
10 | */
11 | target: 'static',
12 | /*
13 | ** Headers of the page
14 | ** See https://nuxtjs.org/api/configuration-head
15 | */
16 |
17 | //
18 |
19 | head: {
20 | title: 'The Cupcake Factory (Nuxt/Strapi/Snipcart)',
21 | meta: [
22 | { charset: 'utf-8' },
23 | { name: 'viewport', content: 'width=device-width, initial-scale=1' },
24 | { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
25 | ],
26 | link: [
27 | { rel: 'preconnect', href: "https://app.snipcart.com" },
28 | { rel: 'preconnect', href: "https://cdn.snipcart.com" },
29 | { rel: 'stylesheet', href: "https://cdn.snipcart.com/themes/v3.0.16/default/snipcart.css" },
30 | { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
31 | ],
32 | script: [
33 | { src: 'https://cdn.snipcart.com/themes/v3.0.16/default/snipcart.js'}
34 | ]
35 | },
36 | /*
37 | ** Global CSS
38 | */
39 | css: [
40 | ],
41 | /*
42 | ** Plugins to load before mounting the App
43 | ** https://nuxtjs.org/guide/plugins
44 | */
45 | plugins: [
46 | ],
47 | /*
48 | ** Auto import components
49 | ** See https://nuxtjs.org/api/configuration-components
50 | */
51 | components: true,
52 | /*
53 | ** Nuxt.js dev-modules
54 | */
55 | buildModules: [
56 | // Doc: https://github.com/nuxt-community/nuxt-tailwindcss
57 | '@nuxtjs/tailwindcss',
58 | ],
59 | /*
60 | ** Nuxt.js modules
61 | */
62 | modules: [
63 | '@nuxtjs/apollo'
64 | ],
65 | apollo: {
66 | clientConfigs: {
67 | default: {
68 | httpEndpoint: process.env.BACKEND_URL || "http://localhost:1337/graphql"
69 | }
70 | }
71 | },
72 | env: {
73 | storeUrl: process.env.STORE_URL ||"http://localhost:1337"
74 | },
75 | /*
76 | ** Build configuration
77 | ** See https://nuxtjs.org/api/configuration-build/
78 | */
79 | build: {
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nuxt-strapi-snipcart",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "nuxt",
7 | "build": "nuxt build",
8 | "start": "nuxt start",
9 | "export": "nuxt export",
10 | "serve": "nuxt serve",
11 | "generate": "nuxt build && nuxt export"
12 | },
13 | "dependencies": {
14 | "@nuxtjs/apollo": "^4.0.1-rc.1",
15 | "apollo-cache-inmemory": "^1.6.6",
16 | "core-js": "^2.6.5",
17 | "graphql": "^15.3.0",
18 | "nuxt": "^2.13.0"
19 | },
20 | "devDependencies": {
21 | "@nuxtjs/tailwindcss": "^2.0.0"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
7 |
--------------------------------------------------------------------------------
/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
29 |
30 |
31 |
62 |
63 |
65 |
--------------------------------------------------------------------------------
/plugins/README.md:
--------------------------------------------------------------------------------
1 | # PLUGINS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
8 |
--------------------------------------------------------------------------------
/static/README.md:
--------------------------------------------------------------------------------
1 | # STATIC
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your static files.
6 | Each file inside this directory is mapped to `/`.
7 | Thus you'd want to delete this README.md before deploying to production.
8 |
9 | Example: `/static/robots.txt` is mapped as `/robots.txt`.
10 |
11 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
12 |
--------------------------------------------------------------------------------
/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/strapi-nuxt/de173355420ab43af86ea62216a30c88c48442f1/static/favicon.ico
--------------------------------------------------------------------------------
/store/README.md:
--------------------------------------------------------------------------------
1 | # STORE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Vuex Store files.
6 | Vuex Store option is implemented in the Nuxt.js framework.
7 |
8 | Creating a file in this directory automatically activates the option in the framework.
9 |
10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
11 |
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /*
2 | ** TailwindCSS Configuration File
3 | **
4 | ** Docs: https://tailwindcss.com/docs/configuration
5 | ** Default: https://github.com/tailwindcss/tailwindcss/blob/master/stubs/defaultConfig.stub.js
6 | */
7 | module.exports = {
8 | theme: {},
9 | variants: {},
10 | plugins: [],
11 | purge: {
12 | // Learn more on https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css
13 | enabled: process.env.NODE_ENV === 'production',
14 | content: [
15 | 'components/**/*.vue',
16 | 'layouts/**/*.vue',
17 | 'pages/**/*.vue',
18 | 'plugins/**/*.js',
19 | 'nuxt.config.js'
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------