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

Commit 63926b5

Browse files
authored
Merge pull request #29 from IIM-Creative-Technology/dev
Release v0.3
2 parents c52212d + bf314a4 commit 63926b5

7 files changed

Lines changed: 47 additions & 18 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ yarn-error.log*
3232
.turbo
3333

3434
# editor
35-
.idea
35+
.idea

apps/api/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"lint": "eslint . --cache --fix --ext .js,.ts",
1111
"studio": "npx prisma studio",
1212
"migrate": "npx prisma migrate dev",
13-
"test": "jest"
13+
"test": "jest",
14+
"deploy": "npm run start"
1415
},
1516
"devDependencies": {
1617
"@types/jest": "^27.5.1",

apps/web/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
"name": "web",
33
"private": true,
44
"scripts": {
5+
"start": "node .output/server/index.mjs",
56
"build": "nuxt build",
67
"dev": "nuxt dev",
78
"generate": "nuxt generate",
89
"preview": "nuxt preview",
9-
"lint": "eslint . --cache --fix --ext .vue,.js,.ts"
10+
"lint": "eslint . --cache --fix --ext .vue,.js,.ts",
11+
"deploy": "npm run start"
1012
},
1113
"devDependencies": {
1214
"@nuxt/postcss8": "^1.1.3",

apps/web/pages/projects/index.vue

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
33
const { data: projects } = await useAsyncData('projects', () => $fetch('http://localhost:3001/projects'));
44
5+
const createProject = async () => {
6+
await useFetch('http://localhost:3001/projects', {
7+
method: 'POST',
8+
headers: { 'Content-Type': 'application/json' },
9+
body: { name: 'First project' },
10+
});
11+
};
512
// const projects = ref([
613
// { id: 1, name: 'First title', users: [{ name: 'Colin' }, { name: 'Florent' }] },
714
// { id: 2, name: 'Second title', users: [{ name: 'Colin' }] },
@@ -11,21 +18,34 @@ const { data: projects } = await useAsyncData('projects', () => $fetch('http://l
1118
</script>
1219

1320
<template>
14-
<div class="flex">
15-
<NuxtLink
16-
v-for="(project, index) in projects"
17-
:key="index"
18-
:to="`/projects/${project.id}`"
19-
>
20-
<div class="card w-96 bg-secondary-content shadow-xl">
21-
<div class="card-body">
22-
<h2 class="card-title">
23-
{{ project.name }}
24-
</h2>
25-
<p>{{ project.users.map(user => user.name).join(', ') }}</p>
21+
<div class="block">
22+
<div class="navbar bg-base-100">
23+
<div class="navbar-start">
24+
<div class="dropdown">
25+
<label tabindex="0" class="btn btn-ghost lg:hidden" />
2626
</div>
27+
<a class="btn btn-ghost normal-case text-xl">Live kanban</a>
2728
</div>
28-
</NuxtLink>
29+
<div class="navbar-end">
30+
<a class="btn" @click.prevent="createProject">Create project</a>
31+
</div>
32+
</div>
33+
<div class="flex flex-col items-center gap-5 mt-10">
34+
<NuxtLink
35+
v-for="(project, index) in projects"
36+
:key="index"
37+
:to="`/projects/${project.id}`"
38+
>
39+
<div class="card w-96 bg-secondary-content shadow-xl">
40+
<div class="card-body">
41+
<h2 class="card-title">
42+
{{ project.name }}
43+
</h2>
44+
<p>{{ project.users.map(user => user.name).join(', ') }}</p>
45+
</div>
46+
</div>
47+
</NuxtLink>
48+
</div>
2949
</div>
3050
</template>
3151
<script setup>

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
"lint": "turbo run lint",
1414
"test": "turbo run test",
1515
"studio": "turbo run studio --parallel",
16-
"migrate": "turbo run migrate"
16+
"migrate": "turbo run migrate",
17+
"deploy:api": "turbo run deploy --scope=api",
18+
"deploy:web": "turbo run deploy --scope=web"
1719
},
1820
"devDependencies": {
1921
"cz-conventional-changelog": "^3.3.0",

turbo.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
},
2121
"migrate": {
2222
"outputs": ["prisma/migrations/**"]
23+
},
24+
"deploy": {
25+
"dependsOn": ["migrate"],
26+
"outputs": []
2327
}
2428
}
2529
}

0 commit comments

Comments
 (0)