Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions vue-js/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist


# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
2 changes: 2 additions & 0 deletions vue-js/.yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Hotfix for Node 8.x
--install.ignore-engines true
9 changes: 9 additions & 0 deletions vue-js/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# vue-js
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we mimic the setup instructions to be similar to the other skeletons (see https://github.com/guizlet/frontend-interview/blob/master/react-js/README.md as an example)? It'll be clear to the candidate the exact steps they'll need to run in order to see the question when they spin up their local server. Thanks!


### How to run this app

1. `npm install` or `yarn install`
2. `npm serve` or `yarn serve`
3. Visit http://localhost:5678 and make sure the page loads!


5 changes: 5 additions & 0 deletions vue-js/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
42 changes: 42 additions & 0 deletions vue-js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "vue-js",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.5",
"vue": "^3.0.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
Binary file added vue-js/public/favicon.ico
Binary file not shown.
17 changes: 17 additions & 0 deletions vue-js/public/index.html
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><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> 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>
43 changes: 43 additions & 0 deletions vue-js/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<template>
<LearnMode :terms="terms" />
</template>

<script>
import LearnMode from './components/LearnMode.vue'

export default {
name: 'app',
components: {
LearnMode
},
setup() {
return {
terms: [
{
id: 1,
word: 'Nebraska',
definition: 'Lincoln',
},
{
id: 2,
word: 'Massachusetts',
definition: 'Boston',
},
{
id: 3,
word: 'California',
definition: 'Sacramento',
},
]
};
}
}
</script>

<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
margin: 0;
padding: 0;
}
</style>
59 changes: 59 additions & 0 deletions vue-js/src/components/LearnMode.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<template>
<!-- Your HTML changes here -->
<div class="LearnMode">
<h1 class="LearnMode-prompt">{{terms[0].word}}</h1>
<form class="LearnMode-form">
<input auto="{true}" class="LearnMode-input" type="text" />
<button class="LearnMode-submit" type="submit">
Submit
</button>
</form>
</div>
</template>

<script>
// Your JS changes here
export default {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we leave a comment denoting where the candidate should start coding their solution in?

name: 'LearnMode',
props: ['terms']
}
</script>

<style scoped>
/* Your CSS changes here */
.LearnMode {
padding: 20px;
}

.LearnMode-prompt {
margin: 0 0 16px;
}

.LearnMode-input {
border-radius: 2px;
border: 2px solid #d9dfe2;
display: inline-block;
font-size: 15px;
line-height: 1.35;
margin-right: 5px;
outline: 0 none;
padding: 8px;
resize: none;
}

.LearnMode-submit {
background: #1f6fd9;
border-radius: 2px;
border: 1px solid #1d66c8;
color: #fff;
display: inline-block;
font-size: 14px;
font-weight: 500;
height: 40px;
line-height: 2.14;
outline: 0 none;
padding: 0 20px;
text-align: center;
}

</style>
4 changes: 4 additions & 0 deletions vue-js/src/main.js
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')
5 changes: 5 additions & 0 deletions vue-js/vue.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
devServer: {
port: 5678,
},
};
Loading