Skip to content

Commit 9fb9995

Browse files
committed
Initial commit
1 parent 55d294f commit 9fb9995

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+13850
-34
lines changed

.babelrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"env": {
3+
"test": {
4+
"presets": [
5+
[
6+
"@babel/preset-env",
7+
{
8+
"targets": {
9+
"node": "current"
10+
}
11+
}
12+
]
13+
]
14+
}
15+
}
16+
}

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitignore

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Node template
3+
# Logs
4+
/logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
10+
# Runtime data
11+
pids
12+
*.pid
13+
*.seed
14+
*.pid.lock
15+
16+
# Directory for instrumented libs generated by jscoverage/JSCover
17+
lib-cov
18+
19+
# Coverage directory used by tools like istanbul
20+
coverage
21+
22+
# nyc test coverage
23+
.nyc_output
24+
25+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26+
.grunt
27+
28+
# Bower dependency directory (https://bower.io/)
29+
bower_components
30+
31+
# node-waf configuration
32+
.lock-wscript
33+
34+
# Compiled binary addons (https://nodejs.org/api/addons.html)
35+
build/Release
36+
37+
# Dependency directories
38+
node_modules/
39+
jspm_packages/
40+
41+
# TypeScript v1 declaration files
42+
typings/
43+
44+
# Optional npm cache directory
45+
.npm
46+
47+
# Optional eslint cache
48+
.eslintcache
49+
50+
# Optional REPL history
51+
.node_repl_history
52+
53+
# Output of 'npm pack'
54+
*.tgz
55+
56+
# Yarn Integrity file
57+
.yarn-integrity
58+
59+
# dotenv environment variables file
60+
.env
61+
62+
# parcel-bundler cache (https://parceljs.org/)
63+
.cache
64+
65+
# next.js build output
66+
.next
67+
68+
# nuxt.js build output
69+
.nuxt
70+
71+
# Nuxt generate
72+
dist
73+
74+
# vuepress build output
75+
.vuepress/dist
76+
77+
# Serverless directories
78+
.serverless
79+
80+
# IDE / Editor
81+
.idea
82+
83+
# Service worker
84+
sw.*
85+
86+
# macOS
87+
.DS_Store
88+
89+
# Vim swap files
90+
*.swp

README.md

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,22 @@
1-
# Vueapp
2-
Information and links for Vue development
1+
# akasha
32

4-
## Setup
3+
> Elder Project
54
6-
1. Open up Editor or IDE (I used Visual Studio Code)
7-
1. Open up terminal
8-
1. npm install -g vue-cli npx
9-
2. npx create-nuxt-app vueapp
10-
- Choose: Javascript
11-
- Choose: NPM
12-
- Choose: Bootstrap Vue
13-
- Choose: Express
14-
- Choose: Axios, PWA Support
15-
- Choose: Jest
16-
- Choose: Universal
17-
- Choose: jsconfig.json
18-
1. cd vueapp
19-
1. npm install vuetify mongodb lodash @onekiloparsec/vue-xeditable
20-
1. npm run dev
5+
## Build Setup
216

22-
## Links
7+
```bash
8+
# install dependencies
9+
$ npm install
2310

24-
* https://vuejs.org
25-
* https://nuxtjs.org
26-
* https://bootstrap-vue.org
27-
* https://vuetifyjs.com/en
28-
* https://devhints.io/vue
29-
* https://www.youtube.com/watch?v=j55fHUJqtyw
30-
* https://www.youtube.com/watch?v=Wy9q22isx3U
31-
* https://www.youtube.com/watch?v=zzUpO8tXoaw
32-
* https://developer.okta.com/blog/2018/02/15/build-crud-app-vuejs-node
33-
* https://snipcart.com/blog/vuejs-blog-demo
34-
* https://gist.github.com/bradtraversy/f407d642bdc3b31681bc7e56d95485b6
35-
* https://redonion.se/en/working-with-css-in-nuxt-js
36-
* https://www.jennapederson.com/blog/2019/10/8/building-a-playground-with-nuxt-and-markdown
37-
* https://regenrek.com/posts/create-a-frontmatter-markdown-powered-blog-with-nuxt.js
38-
* https://code.visualstudio.com
11+
# serve with hot reload at localhost:3000
12+
$ npm run dev
13+
14+
# build for production and launch server
15+
$ npm run build
16+
$ npm run start
17+
18+
# generate static project
19+
$ npm run generate
20+
```
21+
22+
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).

assets/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ASSETS
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
6+
7+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).

assets/images/bootstrap.png

24.6 KB
Loading

assets/images/bootstrapvue.png

36 KB
Loading

assets/images/css3.png

44.8 KB
Loading

assets/images/elasticsearch.png

75.7 KB
Loading

assets/images/html5.png

37.8 KB
Loading

assets/images/jest.png

189 KB
Loading

assets/images/js.png

14.2 KB
Loading

assets/images/lodash.png

21.7 KB
Loading

assets/images/mongodb.png

106 KB
Loading

assets/images/nodejs.png

4.4 KB
Loading

assets/images/nuxt.png

15.6 KB
Loading

assets/images/swagger.png

21.9 KB
Loading

assets/images/vue.png

43.1 KB
Loading

assets/images/vuetify.png

4.09 KB
Loading

components/CharacterComponent.vue

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<template>
2+
<div class="container">
3+
<div class="add-character">
4+
<h1>Characters</h1>
5+
<b-form-input type="text" id="character-name" v-model="name" placeholder="Character Name"/>
6+
<b-form-input type="text" id="character-role" v-model="role" placeholder="Character Role"/>
7+
<b-button variant="success" v-on:click="addCharacter()">
8+
Add Character
9+
</b-button>
10+
<hr>
11+
<b-alert show dismissable variant="danger" v-if="error">{{error}}</b-alert>
12+
<div class="character"
13+
v-for="(character, index) in characters"
14+
v-bind:item="character"
15+
v-bind:index="index"
16+
v-bind:key="character._id">
17+
<div class="text">
18+
<p v-if="character.name">Name: {{character.name}}</p>
19+
<p v-if="character.role">Role: {{character.role}}</p>
20+
<b-button class="float-right" variant="danger" size="sm" v-on:click="deleteCharacter(character._id)">x</b-button>
21+
</div>
22+
</div>
23+
</div>
24+
</div>
25+
</template>
26+
27+
<script>
28+
import CharacterService from '../server/CharacterService';
29+
30+
export default {
31+
name: 'CharacterComponent',
32+
data() {
33+
return {
34+
characters: [],
35+
error: '',
36+
name: '',
37+
role: ''
38+
}
39+
},
40+
async created() {
41+
try {
42+
this.characters = await CharacterService.getCharacters();
43+
} catch(err) {
44+
this.error = err.message;
45+
}
46+
},
47+
methods: {
48+
async addCharacter() {
49+
if (this.name === "") {
50+
this.error = "No name specified";
51+
} else {
52+
this.error = "";
53+
await CharacterService.addCharacter(this.name, this.role);
54+
this.characters = await CharacterService.getCharacters();
55+
}
56+
},
57+
async deleteCharacter(id) {
58+
this.error = "";
59+
await CharacterService.deleteCharacter(id);
60+
this.characters = await CharacterService.getCharacters();
61+
}
62+
}
63+
}
64+
</script>
65+
66+
<!-- Add "scoped" attribute to limit CSS to this component only -->
67+
<style scoped>
68+
p {
69+
margin-bottom: 0;
70+
}
71+
72+
p.text {
73+
font-size: 22px;
74+
font-weight: 700;
75+
margin-bottom: 0;
76+
}
77+
78+
.btn-sm, .btn-group-sm > .btn {
79+
padding: 0.025rem 0.5rem;
80+
}
81+
82+
div.container {
83+
max-width: 800px;
84+
margin: 0 auto;
85+
}
86+
87+
div.character {
88+
position: relative;
89+
border: 1px solid #58D6B6;
90+
background-color: #B8FFE1;
91+
padding: 10px 10px 10px 10px;
92+
margin-bottom: 15px;
93+
overflow: hidden;
94+
}
95+
</style>

components/Logo.vue

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<template>
2+
<svg
3+
class="NuxtLogo"
4+
width="245"
5+
height="180"
6+
viewBox="0 0 452 342"
7+
xmlns="http://www.w3.org/2000/svg"
8+
>
9+
<g fill="none" fill-rule="evenodd">
10+
<path
11+
d="M139 330l-1-2c-2-4-2-8-1-13H29L189 31l67 121 22-16-67-121c-1-2-9-14-22-14-6 0-15 2-22 15L5 303c-1 3-8 16-2 27 4 6 10 12 24 12h136c-14 0-21-6-24-12z"
12+
fill="#00C58E"
13+
/>
14+
<path
15+
d="M447 304L317 70c-2-2-9-15-22-15-6 0-15 3-22 15l-17 28v54l39-67 129 230h-49a23 23 0 0 1-2 14l-1 1c-6 11-21 12-23 12h76c3 0 17-1 24-12 3-5 5-14-2-26z"
16+
fill="#108775"
17+
/>
18+
<path
19+
d="M376 330v-1l1-2c1-4 2-8 1-12l-4-12-102-178-15-27h-1l-15 27-102 178-4 12a24 24 0 0 0 2 15c4 6 10 12 24 12h190c3 0 18-1 25-12zM256 152l93 163H163l93-163z"
20+
fill="#2F495E"
21+
fill-rule="nonzero"
22+
/>
23+
</g>
24+
</svg>
25+
</template>
26+
27+
<style>
28+
.NuxtLogo {
29+
animation: 1s appear;
30+
margin: auto;
31+
}
32+
33+
@keyframes appear {
34+
0% {
35+
opacity: 0;
36+
}
37+
100% {
38+
opacity: 1;
39+
}
40+
}
41+
</style>

components/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# COMPONENTS
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
The components directory contains your Vue.js Components.
6+
7+
_Nuxt.js doesn't supercharge these components._

jest.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
moduleNameMapper: {
3+
'^@/(.*)$': '<rootDir>/$1',
4+
'^~/(.*)$': '<rootDir>/$1',
5+
'^vue$': 'vue/dist/vue.common.js'
6+
},
7+
moduleFileExtensions: [
8+
'js',
9+
'vue',
10+
'json'
11+
],
12+
transform: {
13+
'^.+\\.js$': 'babel-jest',
14+
'.*\\.(vue)$': 'vue-jest'
15+
},
16+
collectCoverage: true,
17+
collectCoverageFrom: [
18+
'<rootDir>/components/**/*.vue',
19+
'<rootDir>/pages/**/*.vue'
20+
]
21+
}

jsconfig.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": ".",
4+
"paths": {
5+
"~/*": ["./*"],
6+
"@/*": ["./*"],
7+
"~~/*": ["./*"],
8+
"@@/*": ["./*"]
9+
}
10+
},
11+
"exclude": ["node_modules", ".nuxt", "dist"]
12+
}

layouts/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# LAYOUTS
2+
3+
**This directory is not required, you can delete it if you don't want to use it.**
4+
5+
This directory contains your Application Layouts.
6+
7+
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).

0 commit comments

Comments
 (0)