Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #29 from IIM-Creative-Technology/dev
Browse files Browse the repository at this point in the history
Release v0.3
  • Loading branch information
ColinEspinas authored May 19, 2022
2 parents c52212d + bf314a4 commit 63926b5
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ yarn-error.log*
.turbo

# editor
.idea
.idea
3 changes: 2 additions & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"lint": "eslint . --cache --fix --ext .js,.ts",
"studio": "npx prisma studio",
"migrate": "npx prisma migrate dev",
"test": "jest"
"test": "jest",
"deploy": "npm run start"
},
"devDependencies": {
"@types/jest": "^27.5.1",
Expand Down
4 changes: 3 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
"name": "web",
"private": true,
"scripts": {
"start": "node .output/server/index.mjs",
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"lint": "eslint . --cache --fix --ext .vue,.js,.ts"
"lint": "eslint . --cache --fix --ext .vue,.js,.ts",
"deploy": "npm run start"
},
"devDependencies": {
"@nuxt/postcss8": "^1.1.3",
Expand Down
46 changes: 33 additions & 13 deletions apps/web/pages/projects/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
const { data: projects } = await useAsyncData('projects', () => $fetch('http://localhost:3001/projects'));
const createProject = async () => {
await useFetch('http://localhost:3001/projects', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: { name: 'First project' },
});
};
// const projects = ref([
// { id: 1, name: 'First title', users: [{ name: 'Colin' }, { name: 'Florent' }] },
// { id: 2, name: 'Second title', users: [{ name: 'Colin' }] },
Expand All @@ -11,21 +18,34 @@ const { data: projects } = await useAsyncData('projects', () => $fetch('http://l
</script>

<template>
<div class="flex">
<NuxtLink
v-for="(project, index) in projects"
:key="index"
:to="`/projects/${project.id}`"
>
<div class="card w-96 bg-secondary-content shadow-xl">
<div class="card-body">
<h2 class="card-title">
{{ project.name }}
</h2>
<p>{{ project.users.map(user => user.name).join(', ') }}</p>
<div class="block">
<div class="navbar bg-base-100">
<div class="navbar-start">
<div class="dropdown">
<label tabindex="0" class="btn btn-ghost lg:hidden" />
</div>
<a class="btn btn-ghost normal-case text-xl">Live kanban</a>
</div>
</NuxtLink>
<div class="navbar-end">
<a class="btn" @click.prevent="createProject">Create project</a>
</div>
</div>
<div class="flex flex-col items-center gap-5 mt-10">
<NuxtLink
v-for="(project, index) in projects"
:key="index"
:to="`/projects/${project.id}`"
>
<div class="card w-96 bg-secondary-content shadow-xl">
<div class="card-body">
<h2 class="card-title">
{{ project.name }}
</h2>
<p>{{ project.users.map(user => user.name).join(', ') }}</p>
</div>
</div>
</NuxtLink>
</div>
</div>
</template>
<script setup>
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"lint": "turbo run lint",
"test": "turbo run test",
"studio": "turbo run studio --parallel",
"migrate": "turbo run migrate"
"migrate": "turbo run migrate",
"deploy:api": "turbo run deploy --scope=api",
"deploy:web": "turbo run deploy --scope=web"
},
"devDependencies": {
"cz-conventional-changelog": "^3.3.0",
Expand Down
4 changes: 4 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
},
"migrate": {
"outputs": ["prisma/migrations/**"]
},
"deploy": {
"dependsOn": ["migrate"],
"outputs": []
}
}
}

0 comments on commit 63926b5

Please sign in to comment.