[
  {
    "path": ".gitignore",
    "content": "\n# Created by https://www.toptal.com/developers/gitignore/api/macos,visualstudiocode,windows\n# Edit at https://www.toptal.com/developers/gitignore?templates=macos,visualstudiocode,windows\n\n### macOS ###\n# General\n.DS_Store\n.AppleDouble\n.LSOverride\n\n# Icon must end with two \\r\nIcon\n\n# Thumbnails\n._*\n\n# Files that might appear in the root of a volume\n.DocumentRevisions-V100\n.fseventsd\n.Spotlight-V100\n.TemporaryItems\n.Trashes\n.VolumeIcon.icns\n.com.apple.timemachine.donotpresent\n\n# Directories potentially created on remote AFP share\n.AppleDB\n.AppleDesktop\nNetwork Trash Folder\nTemporary Items\n.apdisk\n\n### VisualStudioCode ###\n.vscode/*\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n*.code-workspace\n\n### VisualStudioCode Patch ###\n# Ignore all local history of files\n.history\n\n### Windows ###\n# Windows thumbnail cache files\nThumbs.db\nThumbs.db:encryptable\nehthumbs.db\nehthumbs_vista.db\n\n# Dump file\n*.stackdump\n\n# Folder config file\n[Dd]esktop.ini\n\n# Recycle Bin used on file shares\n$RECYCLE.BIN/\n\n# Windows Installer files\n*.cab\n*.msi\n*.msix\n*.msm\n*.msp\n\n# Windows shortcuts\n*.lnk\n\n# End of https://www.toptal.com/developers/gitignore/api/macos,visualstudiocode,windows\n"
  },
  {
    "path": "LICENSE.txt",
    "content": "MIT License\n\nCopyright (c) [year] [fullname]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n"
  },
  {
    "path": "README.md",
    "content": "**:no_entry: Deprecated**\n\nThis repository is no longer maintained and only works for Strapi v3. To find the newest Strapi v4 starters, check out the [starters-and-templates monorepo](https://github.com/strapi/starters-and-templates/).\n\n---\n\n# Strapi Starter Nuxt.js E-commerce\n\nNuxt.js starter for creating a simple e-commerce website with Strapi.\n\n![screenshot image](/screenshot.png)\n\nThis starter allows you to try Strapi with Nuxt.js with the example of a simple e-commerce website where you can buy dev stickers. It is fully customizable and due to the fact that it is open source, fully open to contributions. So do not hesitate to add new features and report bugs!\n\nThis starter uses the [Strapi corporate template](https://github.com/strapi/strapi-template-ecommerce)\n\nCheck out all of our starters [here](https://strapi.io/starters)\n\n## Features\n\n- 1 Component\n- 2 Collection types: Product, Category\n- 27 Created products\n- 6 Created categories\n- Permissions set to `true` for product and category\n- Responsive design using Tailwind css\n- Slug system\n- Publication system (draft & published)\n- Role based access controls\n- [@nuxt/strapi](https://strapi.nuxtjs.org/) module on the frontend\n- Payments handled with Snipcart\n\nThis starter is using [Snipcart](https://snipcart.com/) which allows you setup a shopping cart on any website. They wrote a [tutorial](https://snipcart.com/blog/strapi-nuxt-ecommerce-tutorial) teaching you how to create this website but selling cupcakes!\n\nPayment will not work on localhost, we are redirecting you to this [tutorial](https://snipcart.com/blog/develop-a-snipcart-powered-website-locally-using-ngrok) if you want to test payment locally.\n\n\n## Getting started\n\nUse our `create-strapi-starter` CLI to create your project.\n\n```sh\nnpx create-strapi-starter@3 my-site nuxt-e-commerce\n```\n\nThe CLI will create a monorepo, install dependencies, and run your project automatically.\n\nThe Nuxt frontend server will run here => [http://localhost:3000](http://localhost:3000)\n\nThe Strapi backend server will run here => [http://localhost:1337](http://localhost:1337)\n\n## Deploying to production\n\nYou will need to deploy the `frontend` and `backend` projects separately. Here are the docs to deploy each one:\n\n- [Deploy Strapi](https://strapi.io/documentation/developer-docs/latest/setup-deployment-guides/deployment.html#hosting-provider-guides)\n- [Deploy Nuxt](https://nuxtjs.org/docs/2.x/deployment/deploying-to-21yunbox)\n\nDon't forget to setup the environment variables on your production app:\n\nFor the frontend the following environment variable is required: \n- `API_URL`: URL of your Strapi backend, without trailing slash\n\n\nEnjoy this starter!\n"
  },
  {
    "path": "starter/.gitignore",
    "content": "### Node template\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# test snapshots\ntest/**/__snapshots__\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# next.js build output\n.next\n\n# nuxt.js build output\n.nuxt\n\n# Nuxt generate\ndist\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless\n\n# IDE\n.idea\n\n# Service worker\nsw.*\n\n.DS_Store\n"
  },
  {
    "path": "starter/assets/README.md",
    "content": "# ASSETS\n\n**This directory is not required, you can delete it if you don't want to use it.**\n\nThis directory contains your un-compiled assets such as LESS, SASS, or JavaScript.\n\nMore information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).\n"
  },
  {
    "path": "starter/assets/css/tailwind.css",
    "content": "@import 'tailwindcss/base';\n@import 'tailwindcss/components';\n@import 'tailwindcss/utilities';\n"
  },
  {
    "path": "starter/components/Buttons.vue",
    "content": "<template>\n<div class=\"\">\n  <div v-if=\"error\">\n    {{ error }}\n  </div>\n  <div v-else>\n    <div class=\"container flex flex-wrap mx-auto ml-4 mr-6 mt-8\">\n      <nuxt-link v-for=\"category in categories\" :to=\"`/categories/${category.slug}`\" :key=\"category.id\" class=\"bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 px-4 ml-2 border border-gray-400 rounded shadow\">\n        {{ category.name }}\n      </nuxt-link>\n    </div>\n\n  </div>\n</div>\n</template>\n\n<script>\nexport default {\n  data() {\n    return {\n      categories: [],\n      error: null\n    }\n  },\n  async mounted() {\n    try {\n      this.categories = await this.$strapi.find('categories')\n    } catch (error) {\n      this.error = error\n    }\n  },\n}\n</script>\n\n<style lang=\"css\" scoped>\n</style>\n"
  },
  {
    "path": "starter/components/Footer.vue",
    "content": "<template>\n<div class=\"flex justify-between m-6\">\n  <p class=\"text-xs font-semibold text-gray-600\">Strapi Starter Nuxt.js E-commerce</p>\n  <div class=\"flex\">\n    <a href=\"https://twitter.com/strapijs\" class=\"max-w-xs ml-4\">\n      <Twitter />\n    </a>\n    <a href=\"https://facebook.com/strapijs\" class=\"ml-3\">\n      <Facebook />\n    </a>\n    <a href=\"https://github.com/strapi/strapi-starter-nuxt-e-commerce\" class=\"ml-3\">\n      <Github />\n    </a>\n  </div>\n</div>\n</template>\n<script>\nimport Twitter from \"~/components/icons/twitter.vue\";\nimport Github from \"~/components/icons/github.vue\";\nimport Facebook from \"~/components/icons/facebook.vue\";\n\nexport default {\n  components: {\n    Twitter,\n    Github,\n    Facebook\n  }\n}\n</script>\n\n<style>\n.emoji {\n  font-size: 30px;\n}\n</style>\n"
  },
  {
    "path": "starter/components/Navbar.vue",
    "content": "<template>\n<div class=\"flex justify-between ml-6 mr-6 mt-4\">\n  <nuxt-link to=\"/\">\n    <span class=\"emoji\">\n      <img src=\"~/assets/strapi.png\" class=\"logo\" height=\"150\" width=\"150\" />\n    </span>\n  </nuxt-link>\n\n  <button class=\"snipcart-checkout flex items-center\">\n    <Cart />\n    <span class=\"snipcart-total-price ml-3 font-semibold text-sm text-indigo-500\"></span>\n  </button>\n</div>\n</template>\n\n<script>\nimport Cart from \"./icons/cart.vue\"\n\nexport default {\n  components: {\n    Cart\n  }\n}\n</script>\n\n<style>\n.emoji {\n  font-size: 30px;\n}\n\n</style>\n"
  },
  {
    "path": "starter/components/Products.vue",
    "content": "<template>\n<div>\n  <div v-if=\"error\">\n    {{ error }}\n  </div>\n  <div class=\"m-6 grid grid-cols-1 sm:grid-cols-3 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-3 gap-4 mt-8\" v-else>\n    <div v-for=\"product in products\" :key=\"product.id\" class=\"border rounded-lg bg-gray-100 hover:shadow-lg shadow-md\">\n      <nuxt-link :to=\"`/products/${product.slug}`\">\n        <div class=\"rounded-t-lg bg-white pt-2 pb-2\">\n          <img v-lazy class=\"crop mx-auto\" src=\"~/assets/img/placeholder-image.png\" :data-src=\"`${getStrapiMedia(product.image.formats.thumbnail.url)}`\">\n        </div>\n        <div class=\"pl-4 pr-4 pb-4 pt-4 rounded-lg\">\n          <h4 class=\"mt-1 font-semibold text-base leading-tight truncate text-gray-700\">{{product.title}} sticker</h4>\n          <div class=\"mt-1 text-sm text-gray-700\">{{product.description}}</div>\n        </div>\n      </nuxt-link>\n    </div>\n  </div>\n</div>\n</template>\n\n<script>\nimport {\n  getStrapiMedia\n} from '~/utils/medias'\n\nexport default {\n  props: {\n    products: Array,\n    error: Object,\n    storeUrl: String\n  },\n  directives: {\n    lazy: {\n      inserted: (el) => {\n        const observer = new IntersectionObserver((entries, observer) => {\n          entries.forEach(function(entry) {\n            if (entry.isIntersecting) {\n              let lazyImage = entry.target;\n              lazyImage.src = lazyImage.dataset.src;\n              observer.unobserve(el);\n            }\n          });\n        });\n        observer.observe(el);\n      },\n    },\n  },\n  methods: {\n    getStrapiMedia\n  }\n}\n</script>\n\n<style>\n.crop {\n  width: 180px;\n  height: 180px;\n}\n</style>\n"
  },
  {
    "path": "starter/components/icons/cart.vue",
    "content": "<template>\n  <svg width=\"31\" height=\"100%\" viewBox=\"0 0 31 27\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <path\n      d=\"M1.10512 0.368718C0.560256 0.368718 0.118164 0.812066 0.118164 1.35848C0.118164 1.9049 0.560256 2.34824 1.10512 2.34824H4.90887L8.30138 18.4009C8.43503 19.0053 8.83085 19.5079 9.32946 19.5041H25.7788C26.3005 19.5118 26.7799 19.0375 26.7799 18.5143C26.7799 17.9911 26.3006 17.5168 25.7788 17.5245H10.1315L9.71003 15.545H27.095C27.5371 15.5412 27.9547 15.2048 28.0511 14.7718L30.354 4.87412C30.4825 4.29933 29.9852 3.67172 29.3979 3.66786H7.21171L6.6771 1.15221C6.58329 0.71276 6.15921 0.368652 5.7107 0.368652L1.10512 0.368718ZM7.623 5.64746H12.7634L13.2569 8.61674H8.25005L7.623 5.64746ZM14.7785 5.64746H20.9881L20.4946 8.61674H15.2719L14.7785 5.64746ZM23.0031 5.64746H28.1537L27.4649 8.61674H22.5097L23.0031 5.64746ZM8.67181 10.5963H13.5862L14.0797 13.5656H9.29919L8.67181 10.5963ZM15.6009 10.5963H20.1656L19.6721 13.5656H16.0944L15.6009 10.5963ZM22.1807 10.5963H27.0023L26.3135 13.5656H21.6872L22.1807 10.5963ZM12.6197 20.164C10.8141 20.164 9.32979 21.6525 9.32979 23.4632C9.32979 25.2739 10.8141 26.7624 12.6197 26.7624C14.4252 26.7624 15.9095 25.2739 15.9095 23.4632C15.9095 21.6525 14.4252 20.164 12.6197 20.164ZM22.4892 20.164C20.6837 20.164 19.1994 21.6525 19.1994 23.4632C19.1994 25.2739 20.6837 26.7624 22.4892 26.7624C24.2948 26.7624 25.7791 25.2739 25.7791 23.4632C25.7791 21.6525 24.2948 20.164 22.4892 20.164ZM12.6197 22.1435C13.3586 22.1435 13.9356 22.7222 13.9356 23.4632C13.9356 24.2042 13.3586 24.7829 12.6197 24.7829C11.8807 24.7829 11.3037 24.2042 11.3037 23.4632C11.3037 22.7222 11.8807 22.1435 12.6197 22.1435ZM22.4892 22.1435C23.2282 22.1435 23.8052 22.7222 23.8052 23.4632C23.8052 24.2042 23.2282 24.7829 22.4892 24.7829C21.7503 24.7829 21.1733 24.2042 21.1733 23.4632C21.1733 22.7222 21.7503 22.1435 22.4892 22.1435Z\"\n      class=\"fill-current text-indigo-500\"\n    />\n  </svg>\n</template>"
  },
  {
    "path": "starter/components/icons/facebook.vue",
    "content": "<template>\n  <svg\n    id=\"Bold\"\n    enable-background=\"new 0 0 24 24\"\n    viewBox=\"0 0 24 24\"\n    height=\"20px\"\n    width=\"20px\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    class=\"fill-current text-gray-600\"\n  >\n    <path\n      d=\"m15.997 3.985h2.191v-3.816c-.378-.052-1.678-.169-3.192-.169-3.159 0-5.323 1.987-5.323 5.639v3.361h-3.486v4.266h3.486v10.734h4.274v-10.733h3.345l.531-4.266h-3.877v-2.939c.001-1.233.333-2.077 2.051-2.077z\"\n    />\n  </svg>\n</template>"
  },
  {
    "path": "starter/components/icons/github.vue",
    "content": "<template>\n  <svg\n    enable-background=\"new 0 0 24 24\"\n    height=\"20px\"\n    width=\"20px\"\n    viewBox=\"0 0 24 24\"\n    class=\"fill-current text-gray-600\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n  >\n    <path\n      d=\"m12 .5c-6.63 0-12 5.28-12 11.792 0 5.211 3.438 9.63 8.205 11.188.6.111.82-.254.82-.567 0-.28-.01-1.022-.015-2.005-3.338.711-4.042-1.582-4.042-1.582-.546-1.361-1.335-1.725-1.335-1.725-1.087-.731.084-.716.084-.716 1.205.082 1.838 1.215 1.838 1.215 1.07 1.803 2.809 1.282 3.495.981.108-.763.417-1.282.76-1.577-2.665-.295-5.466-1.309-5.466-5.827 0-1.287.465-2.339 1.235-3.164-.135-.298-.54-1.497.105-3.121 0 0 1.005-.316 3.3 1.209.96-.262 1.98-.392 3-.398 1.02.006 2.04.136 3 .398 2.28-1.525 3.285-1.209 3.285-1.209.645 1.624.24 2.823.12 3.121.765.825 1.23 1.877 1.23 3.164 0 4.53-2.805 5.527-5.475 5.817.42.354.81 1.077.81 2.182 0 1.578-.015 2.846-.015 3.229 0 .309.21.678.825.56 4.801-1.548 8.236-5.97 8.236-11.173 0-6.512-5.373-11.792-12-11.792z\"\n    />\n  </svg>\n</template>"
  },
  {
    "path": "starter/components/icons/twitter.vue",
    "content": "<template>\n  <svg\n    version=\"1.1\"\n    id=\"Capa_1\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n    x=\"0px\"\n    y=\"0px\"\n    height=\"20px\"\n    width=\"20px\"\n    viewBox=\"0 0 512 512\"\n    style=\"enable-background:new 0 0 512 512;\"\n    xml:space=\"preserve\"\n    class=\"fill-current text-gray-600\"\n  >\n    <g>\n      <g>\n        <path\n          d=\"M512,97.248c-19.04,8.352-39.328,13.888-60.48,16.576c21.76-12.992,38.368-33.408,46.176-58.016\n\t\t\tc-20.288,12.096-42.688,20.64-66.56,25.408C411.872,60.704,384.416,48,354.464,48c-58.112,0-104.896,47.168-104.896,104.992\n\t\t\tc0,8.32,0.704,16.32,2.432,23.936c-87.264-4.256-164.48-46.08-216.352-109.792c-9.056,15.712-14.368,33.696-14.368,53.056\n\t\t\tc0,36.352,18.72,68.576,46.624,87.232c-16.864-0.32-33.408-5.216-47.424-12.928c0,0.32,0,0.736,0,1.152\n\t\t\tc0,51.008,36.384,93.376,84.096,103.136c-8.544,2.336-17.856,3.456-27.52,3.456c-6.72,0-13.504-0.384-19.872-1.792\n\t\t\tc13.6,41.568,52.192,72.128,98.08,73.12c-35.712,27.936-81.056,44.768-130.144,44.768c-8.608,0-16.864-0.384-25.12-1.44\n\t\t\tC46.496,446.88,101.6,464,161.024,464c193.152,0,298.752-160,298.752-298.688c0-4.64-0.16-9.12-0.384-13.568\n\t\t\tC480.224,136.96,497.728,118.496,512,97.248z\"\n        />\n      </g>\n    </g>\n    <g />\n    <g />\n    <g />\n    <g />\n    <g />\n    <g />\n    <g />\n    <g />\n    <g />\n    <g />\n    <g />\n    <g />\n    <g />\n    <g />\n    <g />\n  </svg>\n</template>"
  },
  {
    "path": "starter/layouts/default.vue",
    "content": "<template>\n<div class=\"flex justify-center bg-gray-200\">\n  <div class=\"max-w-screen-lg flex flex-col min-h-screen w-full\">\n    <NavBar />\n    <Buttons />\n    <Nuxt class=\"flex-grow\" />\n    <Footer />\n  </div>\n  <div hidden id=\"snipcart\" data-api-key=\"ODhhNWUxOGEtNTk0OC00OTQwLWJkOWMtM2M1ZmNjODU1ZDJhNjM3MzMyNzM0NjM1OTMyNjcz\"></div>\n</div>\n</template>\n\n<script>\nimport NavBar from './../components/Navbar'\nimport Footer from './../components/Footer'\nimport Buttons from './../components/Buttons'\n\nexport default {\n  components: {\n    NavBar,\n    Footer,\n    Buttons\n  }\n}\n</script>\n"
  },
  {
    "path": "starter/nuxt.config.js",
    "content": "export default {\n  /*\n   ** Nuxt target\n   ** See https://nuxtjs.org/api/configuration-target\n   */\n  target: 'static',\n  /*\n   ** Headers of the page\n   ** See https://nuxtjs.org/api/configuration-head\n   */\n\n  //  <script src=\"https://cdn.snipcart.com/themes/v3.0.16/default/snipcart.js\"></script>\n\n  head: {\n    title: \"Buy stickers with Strapi, Nuxt.js and Snipcart\",\n    meta: [{\n        charset: 'utf-8'\n      },\n      {\n        name: 'viewport',\n        content: 'width=device-width, initial-scale=1'\n      },\n      {\n        hid: 'description',\n        name: 'description',\n        content: \"e-commerce starter using Strapi, Nuxt.js and Snipcart\"\n      }\n    ],\n    link: [{\n        rel: 'preconnect',\n        href: \"https://app.snipcart.com\"\n      },\n      {\n        rel: 'preconnect',\n        href: \"https://cdn.snipcart.com\"\n      },\n      {\n        rel: 'stylesheet',\n        href: \"https://cdn.snipcart.com/themes/v3.0.16/default/snipcart.css\"\n      },\n      {\n        rel: 'icon',\n        type: 'image/x-icon',\n        href: '/favicon.ico'\n      }\n    ],\n    script: [{\n      src: 'https://cdn.snipcart.com/themes/v3.0.16/default/snipcart.js'\n    }]\n  },\n  /*\n   ** Global CSS\n   */\n  css: [],\n  /*\n   ** Plugins to load before mounting the App\n   ** https://nuxtjs.org/guide/plugins\n   */\n  plugins: [],\n  /*\n   ** Auto import components\n   ** See https://nuxtjs.org/api/configuration-components\n   */\n  components: true,\n  /*\n   ** Nuxt.js dev-modules\n   */\n  buildModules: [\n    // Doc: https://github.com/nuxt-community/nuxt-tailwindcss\n    '@nuxtjs/tailwindcss',\n  ],\n  /*\n   ** Nuxt.js modules\n   */\n  modules: ['@nuxtjs/strapi'],\n  strapi: {\n    url: process.env.API_URL || \"http://localhost:1337\",\n    entities: [\n      'products',\n      'categories'\n    ],\n  },\n  env: {\n    storeUrl: process.env.STORE_URL || \"http://localhost:1337\"\n  },\n  /*\n   ** Build configuration\n   ** See https://nuxtjs.org/api/configuration-build/\n   */\n  build: {}\n}\n"
  },
  {
    "path": "starter/package.json",
    "content": "{\n  \"name\": \"nuxt-strapi-snipcart\",\n  \"version\": \"1.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"develop\": \"nuxt\",\n    \"start\": \"nuxt start\",\n    \"serve\": \"nuxt serve\",\n    \"generate\": \"nuxt generate\"\n  },\n  \"dependencies\": {\n    \"@nuxtjs/strapi\": \"^0.1.3\",\n    \"core-js\": \"^2.6.5\",\n    \"nuxt\": \"^2.14.6\",\n    \"vue-meta\": \"^2.4.0\"\n  },\n  \"devDependencies\": {\n    \"@nuxtjs/tailwindcss\": \"^2.0.0\"\n  }\n}\n"
  },
  {
    "path": "starter/pages/categories/_id.vue",
    "content": "<template>\n  <Products :products=\"this.category.products\" :error=\"error\" />\n</template>\n\n<script>\nimport Products from \"~/components/Products.vue\"\n\nexport default {\n  data() {\n    return {\n      category: {},\n      error: null\n    }\n  },\n  async mounted() {\n    try {\n      this.category = await this.$strapi.$categories.findOne(this.$route.params.id)\n    } catch (error) {\n      this.error = error\n    }\n  },\n  components: {\n    Products\n  }\n}\n</script>\n"
  },
  {
    "path": "starter/pages/index.vue",
    "content": "<template>\n<Products :products=\"products\" :error=\"error\" :storeUrl=\"storeUrl\" />\n</template>\n\n<script>\nimport Products from \"~/components/Products.vue\"\n\nexport default {\n  data() {\n    return {\n      products: [],\n      storeUrl: process.env.storeUrl,\n      error: null\n    }\n  },\n  async mounted() {\n    try {\n      this.products = await this.$strapi.$products.find()\n    } catch (error) {\n      this.error = error\n    }\n  },\n  components: {\n    Products\n  }\n}\n</script>\n"
  },
  {
    "path": "starter/pages/products/_id.vue",
    "content": "<template>\n<div v-if=\"this.product !== null\">\n  <div class=\"m-6 mt-56 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-2 gap-4 mt-8\">\n    <div class=\"rounded-t-lg pt-2 pb-2\">\n      <img :src=\"`${getStrapiMedia(product.image.formats.thumbnail.url)}`\" class=\"m-auto\">\n    </div>\n    <div class=\"w-full p-5 flex flex-col justify-between\">\n      <div>\n        <h4 class=\"mt-1 font-semibold text-lg leading-tight truncate text-gray-700\">{{product.title}} - ${{ product.price }}</h4>\n        <div class=\"mt-1 text-gray-600\">{{ product.description }}</div>\n      </div>\n\n      <button v-if=\"product.status === 'published'\" class=\"snipcart-add-item mt-4 bg-white border border-gray-200 d hover:shadow-lg text-gray-700 font-semibold py-2 px-4 rounded shadow\" :data-item-id=\"product.id\" :data-item-price=\"product.price\"\n        :data-item-url=\"`${this.$route.fullPath}`\" :data-item-description=\"product.description\" :data-item-image=\"`${getStrapiMedia(product.image.formats.thumbnail.url)}`\" :data-item-name=\"product.title\" v-bind=\"customFields\">\n        Add to cart\n      </button>\n\n      <div class=\"text-center mr-10 mb-1\" v-else>\n        <div class=\"p-2 bg-indigo-800 items-center text-indigo-100 leading-none lg:rounded-full flex lg:inline-flex\" role=\"alert\">\n          <span class=\"flex rounded-full bg-indigo-500 uppercase px-2 py-1 text-xs font-bold mr-3\">Coming soon...</span>\n          <span class=\"font-semibold mr-2 text-left flex-auto\">This article is not available yet.</span>\n        </div>\n      </div>\n\n    </div>\n  </div>\n</div>\n\n<div v-else>\n  {{ error }}\n</div>\n</template>\n\n<script>\nimport {\n  getStrapiMedia\n} from '~/utils/medias'\n\nexport default {\n  data() {\n    return {\n      product: null,\n      error: null\n    }\n  },\n  async mounted() {\n    try {\n      this.product = await this.$strapi.$products.findOne(this.$route.params.id)\n    } catch (error) {\n      this.error = error\n    }\n  },\n  computed: {\n    customFields() {\n      return this.product[\"Custom_field\"]\n        .map(({\n          title,\n          required,\n          options\n        }) => ({\n          name: title,\n          required,\n          options\n        }))\n        .map((x, index) => Object.entries(x)\n          .map(([key, value]) => ({\n            [`data-item-custom${index + 1}-${key.toString().toLowerCase()}`]: value\n          })))\n        .reduce((acc, curr) => acc.concat(curr), [])\n        .reduce((acc, curr) => ({\n          ...acc,\n          ...curr\n        }))\n    }\n  },\n  methods: {\n    getStrapiMedia\n  }\n}\n</script>\n"
  },
  {
    "path": "starter/tailwind.config.js",
    "content": "/*\n** TailwindCSS Configuration File\n**\n** Docs: https://tailwindcss.com/docs/configuration\n** Default: https://github.com/tailwindcss/tailwindcss/blob/master/stubs/defaultConfig.stub.js\n*/\nmodule.exports = {\n  theme: {},\n  variants: {},\n  plugins: [],\n  purge: {\n    // Learn more on https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css\n    enabled: process.env.NODE_ENV === 'production',\n    content: [\n      'components/**/*.vue',\n      'layouts/**/*.vue',\n      'pages/**/*.vue',\n      'plugins/**/*.js',\n      'nuxt.config.js'\n    ]\n  }\n}\n"
  },
  {
    "path": "starter/utils/medias.js",
    "content": "export function getStrapiMedia(url) {\n  // Check if URL is a local path\n  if (url.startsWith('/')) {\n    // Prepend Strapi address\n    return `http://localhost:1337${url}`\n  }\n  // Otherwise return full URL\n  return url\n}\n"
  },
  {
    "path": "starter.json",
    "content": "{\n  \"template\": \"https://github.com/strapi/strapi-template-ecommerce\"\n}\n"
  }
]