diff --git a/cmp-communication-assignment-problem/.browserslistrc b/cmp-communication-assignment-problem/.browserslistrc new file mode 100644 index 0000000..214388f --- /dev/null +++ b/cmp-communication-assignment-problem/.browserslistrc @@ -0,0 +1,3 @@ +> 1% +last 2 versions +not dead diff --git a/cmp-communication-assignment-problem/.eslintrc.js b/cmp-communication-assignment-problem/.eslintrc.js new file mode 100644 index 0000000..3391da1 --- /dev/null +++ b/cmp-communication-assignment-problem/.eslintrc.js @@ -0,0 +1,17 @@ +module.exports = { + root: true, + env: { + node: true + }, + 'extends': [ + 'plugin:vue/vue3-essential', + 'eslint:recommended' + ], + parserOptions: { + parser: 'babel-eslint' + }, + rules: { + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' + } +} diff --git a/cmp-communication-assignment-problem/.gitignore b/cmp-communication-assignment-problem/.gitignore new file mode 100644 index 0000000..11f5d71 --- /dev/null +++ b/cmp-communication-assignment-problem/.gitignore @@ -0,0 +1,22 @@ +.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? diff --git a/cmp-communication-assignment-problem/HOW-TO-USE.pdf b/cmp-communication-assignment-problem/HOW-TO-USE.pdf new file mode 100644 index 0000000..00d28ea Binary files /dev/null and b/cmp-communication-assignment-problem/HOW-TO-USE.pdf differ diff --git a/cmp-communication-assignment-problem/babel.config.js b/cmp-communication-assignment-problem/babel.config.js new file mode 100644 index 0000000..e955840 --- /dev/null +++ b/cmp-communication-assignment-problem/babel.config.js @@ -0,0 +1,5 @@ +module.exports = { + presets: [ + '@vue/cli-plugin-babel/preset' + ] +} diff --git a/cmp-communication-assignment-problem/package.json b/cmp-communication-assignment-problem/package.json new file mode 100644 index 0000000..52d25ec --- /dev/null +++ b/cmp-communication-assignment-problem/package.json @@ -0,0 +1,23 @@ +{ + "name": "vue-first-app", + "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-0", + "babel-eslint": "^10.1.0", + "eslint": "^6.7.2", + "eslint-plugin-vue": "^7.0.0-0" + } +} diff --git a/cmp-communication-assignment-problem/public/favicon.ico b/cmp-communication-assignment-problem/public/favicon.ico new file mode 100644 index 0000000..df36fcf Binary files /dev/null and b/cmp-communication-assignment-problem/public/favicon.ico differ diff --git a/cmp-communication-assignment-problem/public/index.html b/cmp-communication-assignment-problem/public/index.html new file mode 100644 index 0000000..4123528 --- /dev/null +++ b/cmp-communication-assignment-problem/public/index.html @@ -0,0 +1,17 @@ + + + + + + + + <%= htmlWebpackPlugin.options.title %> + + + +
+ + + diff --git a/cmp-communication-assignment-problem/src/main.js b/cmp-communication-assignment-problem/src/main.js new file mode 100644 index 0000000..df62453 --- /dev/null +++ b/cmp-communication-assignment-problem/src/main.js @@ -0,0 +1,16 @@ +import { createApp } from 'vue' + +createApp({}).mount('#app') + +// Task 1: +// Add two components to the app: +// An ActiveUser component and an UserData component +// ActiveUser should output a username (h2) and age (h3) +// UserData should output two input fields => for name and age +// Optional: Add styling of your choice + +// Task 2: Output both components side-by-side in your main App template + +// Task 3: Add user data and ensure it contains a name and age +// User data should be output in ActiveUser +// It should be updated via the UserData component \ No newline at end of file