Skip to content

Commit

Permalink
Merge pull request #11 from Baroshem/feat/stackblitz
Browse files Browse the repository at this point in the history
feat: add Stackblitz
  • Loading branch information
Baroshem authored Feb 27, 2023
2 parents ab120ac + a4fadc3 commit 42713e8
Show file tree
Hide file tree
Showing 12 changed files with 4,577 additions and 9 deletions.
8 changes: 8 additions & 0 deletions .stackblitz/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
*.log*
.nuxt
.nitro
.cache
.output
.env
dist
42 changes: 42 additions & 0 deletions .stackblitz/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Nuxt 3 Minimal Starter

Look at the [nuxt 3 documentation](https://v3.nuxtjs.org) to learn more.

## Setup

Make sure to install the dependencies:

```bash
# yarn
yarn install

# npm
npm install

# pnpm
pnpm install --shamefully-hoist
```

## Development Server

Start the development server on http://localhost:3000

```bash
npm run dev
```

## Production

Build the application for production:

```bash
npm run build
```

Locally preview production build:

```bash
npm run preview
```

Checkout the [deployment documentation](https://v3.nuxtjs.org/guide/deploy/presets) for more information.
24 changes: 24 additions & 0 deletions .stackblitz/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script lang="ts" setup>
const client = useMedusaClient();
const { products } = await client.products.list();
</script>

<template>
<div class="flex">
<div v-for="product in products" class="mx-2">
<div class="relative rounded-lg shadow-lg">
<img
:src="product.thumbnail"
class="shadow-lg rounded-lg opacity-1 hover:opacity-75 transition duration-300 ease-in-out w-full"
/>
<div class="p-6">
<h5 class="font-bold text-lg mb-3">{{ product.title }}</h5>
<pre class="text-gray-500 mb-4">{{
product.variants[0].prices[0].amount
}}</pre>
<p>{{ product.description }}</p>
</div>
</div>
</div>
</div>
</template>
12 changes: 12 additions & 0 deletions .stackblitz/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
// Optional styling
app: {
head: {
script: [
{ src: "https://cdn.tailwindcss.com" }
]
}
},
modules: ['nuxt-medusa'],
});
16 changes: 16 additions & 0 deletions .stackblitz/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"nuxt": "3.2.2"
},
"dependencies": {
"nuxt-medusa": "^0.2.6"
}
}
4 changes: 4 additions & 0 deletions .stackblitz/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// https://v3.nuxtjs.org/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}
Loading

1 comment on commit 42713e8

@vercel
Copy link

@vercel vercel bot commented on 42713e8 Feb 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nuxt-medusa – ./

nuxt-medusa-baroshem.vercel.app
nuxt-medusa-git-main-baroshem.vercel.app
nuxt-medusa.vercel.app

Please sign in to comment.