Skip to content

Commit

Permalink
feat(Vue-trello): start to Vue Trello clone project
Browse files Browse the repository at this point in the history
  • Loading branch information
sabertazimi committed Sep 26, 2021
1 parent dcfa922 commit d1da3ed
Show file tree
Hide file tree
Showing 14 changed files with 138 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ A brand new repository for web development prototypes.
## Vue Collection

- [Learn Vue](https://sabertazimi.github.io/awesome-web/learn-vue)
- [Vue Trello](https://sabertazimi.github.io/awesome-web/vue-trello)

## License

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
"build:prepare": "rm -fr ./build && mkdir -p ./build",
"lint": "lerna run lint",
"release": "lerna version --force-publish --sign-git-commit --sign-git-tag",
"start": "yarn start:learn-vue",
"start:learn-vue": "yarn workspace @sabertazimi/learn-vue serve",
"start": "yarn start:vue-trello",
"start:react-sandbox": "yarn workspace @sabertazimi/react-sandbox start",
"start:learn-vue": "yarn workspace @sabertazimi/learn-vue serve",
"start:vue-trello": "yarn workspace @sabertazimi/vue-trello dev",
"test": "lerna run test"
},
"repository": {
Expand Down
3 changes: 3 additions & 0 deletions packages/vue-trello/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@dg-scripts"
}
5 changes: 5 additions & 0 deletions packages/vue-trello/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
1 change: 1 addition & 0 deletions packages/vue-trello/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @sabertazimi/vue-trello
13 changes: 13 additions & 0 deletions packages/vue-trello/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vue Trello</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
27 changes: 27 additions & 0 deletions packages/vue-trello/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@sabertazimi/vue-trello",
"version": "1.5.0",
"license": "MIT",
"scripts": {
"build": "vue-tsc --noEmit && vite build && yarn build:post",
"build:post": "mkdir -p ../../build/vue-trello && cp -fr ./dist/* ../../build/vue-trello",
"dev": "vite",
"lint": "yarn lint:style && yarn lint:type-check",
"lint:style": "eslint --ext .ts,.vue ./src",
"lint:type-check": "vue-tsc --noEmit",
"serve": "vite preview"
},
"dependencies": {
"vue": "^3.2.19",
"vuex": "^4.0.2"
},
"devDependencies": {
"@dg-scripts/eslint-config": "^1.1.2",
"@vitejs/plugin-vue": "^1.9.2",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
"typescript": "^4.4.3",
"vite": "^2.5.10",
"vue-tsc": "^0.3.0"
}
}
Binary file added packages/vue-trello/public/favicon.ico
Binary file not shown.
18 changes: 18 additions & 0 deletions packages/vue-trello/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script setup lang="ts">
import HelloWorld from './components/HelloWorld.vue';
</script>

<template>
<HelloWorld msg="Vue Trello App" />
</template>

<style>
#app {
margin-top: 60px;
font-family: Avenir, Helvetica, Arial, sans-serif;
color: #2c3e50;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
}
</style>
32 changes: 32 additions & 0 deletions packages/vue-trello/src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<script setup lang="ts">
import { ref } from 'vue';
defineProps<{ msg: string }>();
const count = ref(0);
</script>

<template>
<h1>{{ msg }}</h1>
<button type="button" @click="count++">count is: {{ count }}</button>
<p>
Edit<code>components/HelloWorld.vue</code> to test hot module replacement.
</p>
</template>

<style scoped>
a {
color: #42b983;
}
label {
margin: 0 0.5em;
font-weight: bold;
}
code {
padding: 2px 4px;
color: #304455;
background-color: #eee;
border-radius: 4px;
}
</style>
8 changes: 8 additions & 0 deletions packages/vue-trello/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// <reference types="vite/client" />

declare module '*.vue' {
import { DefineComponent } from 'vue';
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>;
export default component;
}
4 changes: 4 additions & 0 deletions packages/vue-trello/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { createApp } from 'vue';
import App from './App.vue';

createApp(App).mount('#app');
16 changes: 16 additions & 0 deletions packages/vue-trello/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "esnext",
"useDefineForClassFields": true,
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"skipLibCheck": true,
"lib": ["esnext", "dom"]
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}
7 changes: 7 additions & 0 deletions packages/vue-trello/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()]
})

0 comments on commit d1da3ed

Please sign in to comment.