-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
10,772 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
}, | ||
extends: [ | ||
'plugin:vue/essential', | ||
'@vue/airbnb', | ||
'@vue/typescript', | ||
], | ||
rules: { | ||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
'@typescript-eslint/no-unused-vars': 'error', | ||
}, | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser', | ||
}, | ||
overrides: [ | ||
{ | ||
files: [ | ||
'**/__tests__/*.{j,t}s?(x)', | ||
'**/tests/unit/**/*.spec.{j,t}s?(x)', | ||
], | ||
env: { | ||
jest: true, | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
[](https://circleci.com/gh/slaweet/moving-motivators) | ||
[](https://codecov.io/gh/slaweet/moving-motivators) | ||
[](https://lgtm.com/projects/g/slaweet/moving-motivators/alerts/) | ||
[](https://lgtm.com/projects/g/slaweet/moving-motivators/context:javascript) | ||
[](https://david-dm.org/slaweet/moving-motivators) | ||
[](https://david-dm.org/slaweet/moving-motivators?type=dev) | ||
[](https://github.com/airbnb/javascript "AirBnB Style guide") | ||
[](https://opensource.org/licenses/MIT) | ||
|
||
# moving-motivators | ||
|
||
|
||
 | ||
|
||
|
||
## Project setup | ||
``` | ||
yarn install | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
``` | ||
yarn serve | ||
``` | ||
|
||
### Compiles and minifies for production | ||
``` | ||
yarn build | ||
``` | ||
|
||
### Run your unit tests | ||
``` | ||
yarn test:unit | ||
``` | ||
|
||
### Lints and fixes files | ||
``` | ||
yarn lint | ||
``` | ||
|
||
### Customize configuration | ||
See [Configuration Reference](https://cli.vuejs.org/config/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
presets: [ | ||
'@vue/cli-plugin-babel/preset', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "moving-motivators", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"serve": "vue-cli-service serve", | ||
"build": "vue-cli-service build", | ||
"test": "vue-cli-service test:unit", | ||
"eslint": "vue-cli-service lint" | ||
}, | ||
"dependencies": { | ||
"@types/object-hash": "^1.3.1", | ||
"core-js": "^3.4.4", | ||
"object-hash": "^2.0.1", | ||
"vue": "^2.6.10", | ||
"vue-class-component": "^7.0.2", | ||
"vue-property-decorator": "^8.3.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^25.1.1", | ||
"@typescript-eslint/eslint-plugin": "^2.18.0", | ||
"@typescript-eslint/parser": "^2.18.0", | ||
"@vue/cli-plugin-babel": "^4.1.0", | ||
"@vue/cli-plugin-eslint": "^4.1.0", | ||
"@vue/cli-plugin-typescript": "^4.1.0", | ||
"@vue/cli-plugin-unit-jest": "^4.1.0", | ||
"@vue/cli-service": "^4.1.0", | ||
"@vue/eslint-config-airbnb": "^5.0.2", | ||
"@vue/eslint-config-typescript": "^5.0.1", | ||
"@vue/test-utils": "1.0.0-beta.29", | ||
"eslint": "^6.8.0", | ||
"eslint-plugin-vue": "^6.1.2", | ||
"sass": "^1.23.7", | ||
"sass-loader": "^8.0.0", | ||
"typescript": "~3.7.5", | ||
"vue-template-compiler": "^2.6.10" | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> | ||
<title>moving-motivators</title> | ||
</head> | ||
<body> | ||
<noscript> | ||
<strong>We're sorry but moving-motivators doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> | ||
</noscript> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<template> | ||
<div id="app"> | ||
<MovingMotivators/> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Vue } from 'vue-property-decorator'; | ||
import MovingMotivators from './components/MovingMotivators.vue'; | ||
@Component({ | ||
components: { | ||
MovingMotivators, | ||
}, | ||
}) | ||
export default class App extends Vue {} | ||
</script> | ||
|
||
<style lang="scss"> | ||
#app { | ||
font-family: 'Avenir', Helvetica, Arial, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-align: center; | ||
color: #2c3e50; | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Card } from './types'; | ||
|
||
const cards:Card[] = [ | ||
{ | ||
name: 'Curiosity', | ||
description: 'I have plenty of things to investigate and to think about', | ||
}, { | ||
name: 'Honor', | ||
description: 'I feel proud that my personal values are reflected in how I work.', | ||
}, { | ||
name: 'Acceptance', | ||
description: 'The people around me approve of what I do and who I am.', | ||
}, { | ||
name: 'Mastery', | ||
description: 'My work challenges my competence but it is still within my abilities.', | ||
}, { | ||
name: 'Power', | ||
description: 'There’s enough room for me to influence what happens around me.', | ||
}, { | ||
name: 'Freedom', | ||
description: 'I am independent of others with my work and my responsibilities.', | ||
}, { | ||
name: 'Relatedness', | ||
description: 'I have good social contacts with the people in my work.', | ||
}, { | ||
name: 'Order', | ||
description: 'There are enough rules and policies for a stable environment.', | ||
}, { | ||
name: 'Goal', | ||
description: 'My purpose in life is reflected in the work that I do.', | ||
}, { | ||
name: 'Status', | ||
description: 'My position is good, and recognized by the people who work with me.', | ||
}, | ||
]; | ||
export default cards; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<template> | ||
<div class="app"> | ||
<div class="controls"> | ||
<h2>Moving Motivators</h2> | ||
</div> | ||
<div class="footer"> | ||
Built with <a href="https://vuejs.org/" target="_blank">Vue.js</a> | ||
and ❤️ by <a href="https://github.com/slaweet" target="_blank">slaweet</a> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Vue } from 'vue-property-decorator'; | ||
import { Card } from '../types'; | ||
import cards from '../cards'; | ||
@Component({ | ||
components: { | ||
}, | ||
}) | ||
export default class CubeCrash extends Vue { | ||
private cards:Card[] = []; | ||
mounted() { | ||
this.cards = cards; | ||
} | ||
} | ||
</script> | ||
|
||
<!-- Add "scoped" attribute to limit CSS to this component only --> | ||
<style scoped lang="scss"> | ||
.app { | ||
margin: 0 auto; | ||
min-height: 98vh; | ||
display: flex; | ||
justify-content: space-between; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.controls { | ||
display: flex; | ||
width: 442px; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
h1 { | ||
margin: 0; | ||
} | ||
|
||
h2 { | ||
padding-right: 10px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Vue from 'vue'; | ||
import App from './App.vue'; | ||
|
||
Vue.config.productionTip = false; | ||
|
||
new Vue({ | ||
render: (h) => h(App), | ||
}).$mount('#app'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
import Vue, { VNode } from 'vue'; | ||
|
||
declare global { | ||
namespace JSX { | ||
// tslint:disable no-empty-interface | ||
interface Element extends VNode {} | ||
// tslint:disable no-empty-interface | ||
interface ElementClass extends Vue {} | ||
interface IntrinsicElements { | ||
[elem: string]: any | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare module '*.vue' { | ||
import Vue from 'vue'; | ||
|
||
export default Vue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface Card { | ||
name: string | ||
description: string | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"root": "dist", | ||
"clean_urls": true, | ||
"routes": { | ||
"/**": "index.html" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { mount } from '@vue/test-utils'; | ||
import MovingMotivators from '@/components/MovingMotivators.vue'; | ||
|
||
import cards from '../../src/cards'; | ||
|
||
describe('MovingMotivators.vue', () => { | ||
it('renders 10 cards', async () => { | ||
const wrapper = mount(MovingMotivators, { }); | ||
await wrapper.vm.$nextTick(); | ||
expect(wrapper.findAll('.card')).toHaveLength(cards.length); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "esnext", | ||
"strict": true, | ||
"jsx": "preserve", | ||
"importHelpers": true, | ||
"moduleResolution": "node", | ||
"experimentalDecorators": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strictPropertyInitialization": false, | ||
"sourceMap": true, | ||
"baseUrl": ".", | ||
"types": [ | ||
"webpack-env", | ||
"jest" | ||
], | ||
"paths": { | ||
"@/*": [ | ||
"src/*" | ||
] | ||
}, | ||
"lib": [ | ||
"esnext", | ||
"dom", | ||
"dom.iterable", | ||
"scripthost" | ||
] | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"src/**/*.tsx", | ||
"src/**/*.vue", | ||
"tests/**/*.ts", | ||
"tests/**/*.tsx" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
Oops, something went wrong.