diff --git a/README.md b/README.md index 1d5c883..2ea58b8 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,12 @@

+## Prerequisite + +1. It is required to have NodeJs with version 8.5 or higher + +2. If you do not have installed node.js in your machine then go to [this link](https://nodejs.org/en/download/) in order to install node. + ## How to use best-resume-ever requires at least node v.8.5.0. diff --git a/build/dev-server.js b/build/dev-server.js index 1af13bd..e07a432 100755 --- a/build/dev-server.js +++ b/build/dev-server.js @@ -12,6 +12,7 @@ var webpackConfig = process.env.NODE_ENV === 'testing' ? require('./webpack.prod.conf') : require('./webpack.dev.conf') + // default port where dev server listens for incoming traffic var port = process.env.PORT || config.dev.port // automatically open browser, if not set will be false diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 99713cc..b464bcc 100755 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -31,12 +31,6 @@ var webpackConfig = merge(baseWebpackConfig, { new webpack.DefinePlugin({ 'process.env': env }), - new webpack.optimize.UglifyJsPlugin({ - compress: { - warnings: false - }, - sourceMap: true - }), // extract css into its own file new ExtractTextPlugin({ filename: utils.assetsPath('css/[name].[contenthash].css') @@ -87,14 +81,6 @@ var webpackConfig = merge(baseWebpackConfig, { name: 'manifest', chunks: ['vendor'] }), - // copy custom static assets - new CopyWebpackPlugin([ - { - from: path.resolve(__dirname, '../static'), - to: config.build.assetsSubDirectory, - ignore: ['.*'] - } - ]) ] }) diff --git a/config/index.js b/config/index.js index 2a235b9..b2ab167 100755 --- a/config/index.js +++ b/config/index.js @@ -24,7 +24,7 @@ module.exports = { dev: { env: require('./dev.env'), port: 8080, - autoOpenBrowser: true, + autoOpenBrowser: false, assetsSubDirectory: 'static', assetsPublicPath: '/', proxyTable: {}, diff --git a/package.json b/package.json index b0bc504..6fe08ca 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,11 @@ "pdf": "node scripts/export.js", "preview": "node scripts/preview.js", "test:deleteFiles": "node test/scripts/deleteFiles.js", - "test:e2e": "concurrently \"npm run dev\" \"testcafe chromium test/\" --success first --kill-others --raw", + "test:cafe": "testcafe chromium test/", + "test:e2e": "concurrently \"npm run dev\" \"npm run test:cafe\" --success first --kill-others --raw", "test:export": "SCRIPT=export npm run test:deleteFiles && npm run export && mocha test/scripts/export.js", "test:preview": "SCRIPT=preview npm run test:deleteFiles && npm run export && npm run preview && mocha test/scripts/preview.js", - "test:docs": "npm run docs && concurrently \"npm run docs:serve\" \"testcafe chromium test/\" --success first --kill-others --raw", + "test:docs": "npm run docs && concurrently \"npm run docs:serve\" \"npm run test:cafe\" --success first --kill-others --raw", "test": "npm run test:export && npm run test:preview && npm run test:docs && npm run test:e2e", "export": "concurrently \"npm run dev\" \"npm run pdf\" --success first --kill-others --raw", "lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs" @@ -35,48 +36,48 @@ "raleway-webfont": "3.0.1", "roboto-fontface": "0.8.0", "source-sans-pro": "2.0.10", - "vue": "2.5.2", + "vue": "2.5.11", "vue-router": "3.0.1" }, "devDependencies": { - "autoprefixer": "7.1.6", + "autoprefixer": "7.2.3", "babel-cli": "6.26.0", "babel-core": "6.26.0", - "babel-eslint": "8.0.1", + "babel-eslint": "8.0.3", "babel-loader": "7.1.2", "babel-plugin-transform-runtime": "6.23.0", "babel-preset-env": "1.6.1", "babel-preset-stage-2": "6.24.1", "babel-register": "6.26.0", - "chalk": "2.2.2", - "check-node-version": "2.1.0", - "concurrently": "3.5.0", - "connect-history-api-fallback": "1.4.0", - "copy-webpack-plugin": "4.2.0", + "chalk": "2.3.0", + "check-node-version": "3.1.1", + "concurrently": "3.5.1", + "connect-history-api-fallback": "1.5.0", + "copy-webpack-plugin": "4.3.0", "cpx": "1.5.0", "css-loader": "0.28.7", "escope": "3.6.0", - "eslint": "4.11.0", + "eslint": "4.13.1", "eslint-config-standard": "10.2.1", "eslint-friendly-formatter": "3.0.0", "eslint-loader": "1.9.0", - "eslint-plugin-html": "3.2.2", + "eslint-plugin-html": "4.0.1", "eslint-plugin-import": "2.8.0", "eslint-plugin-node": "5.2.1", "eslint-plugin-promise": "3.6.0", "eslint-plugin-standard": "3.0.1", "eventsource-polyfill": "0.9.6", "express": "4.16.2", - "extract-text-webpack-plugin": "3.0.1", + "extract-text-webpack-plugin": "3.0.2", "file-loader": "1.1.5", "friendly-errors-webpack-plugin": "1.6.1", "html-webpack-plugin": "2.30.1", "http": "0.0.0", "http-proxy-middleware": "0.17.4", - "less": "2.7.2", + "less": "2.7.3", "less-loader": "4.0.5", - "local-web-server": "2.2.4", - "lolex": "2.2.0", + "local-web-server": "2.3.0", + "lolex": "2.3.1", "mocha": "4.0.1", "mv": "2.1.1", "opn": "5.1.0", @@ -85,25 +86,26 @@ "pdf-image": "1.1.0", "postcss": "6.0.14", "postcss-cssnext": "3.0.2", - "puppeteer": "0.12.0", + "puppeteer": "0.13.0", "rename": "1.0.4", "request": "2.83.0", "request-promise": "4.2.2", "rimraf": "2.6.2", "rx": "4.1.0", - "rxjs": "5.5.2", + "rxjs": "5.5.5", "semver": "5.4.1", "shelljs": "0.7.8", - "testcafe": "0.18.1", + "testcafe": "0.17.1", + "testcafe-hammerhead": "11.2.1", "url-exists": "1.0.3", "url-loader": "0.6.2", - "vue-loader": "13.4.0", + "vue-loader": "13.6.0", "vue-style-loader": "3.0.3", - "vue-template-compiler": "2.5.2", - "webpack": "3.8.1", - "webpack-bundle-analyzer": "2.9.0", - "webpack-dev-middleware": "1.12.0", - "webpack-hot-middleware": "2.20.0", + "vue-template-compiler": "2.5.11", + "webpack": "3.10.0", + "webpack-bundle-analyzer": "2.9.1", + "webpack-dev-middleware": "2.0.1", + "webpack-hot-middleware": "2.21.0", "webpack-merge": "4.1.1" }, "engines": { diff --git a/scripts/export.js b/scripts/export.js index a9c9124..6bbf756 100755 --- a/scripts/export.js +++ b/scripts/export.js @@ -3,11 +3,12 @@ const fs = require('fs'); const path = require('path'); const Rx = require('rxjs/Rx'); const http = require('http'); +const config = require('../config'); const fetchResponse = () => { return new Promise((res, rej) => { try { - const req = http.request('http://localhost:8080/#/', response => res(response.statusCode)); + const req = http.request(`http://localhost:${config.dev.port}/#/`, response => res(response.statusCode)); req.on('error', (err) => rej(err)); req.end(); } catch (err) { @@ -19,7 +20,7 @@ const fetchResponse = () => { const waitForServerReachable = () => { return Rx.Observable .interval(1000) - .mergeMap(async() => { + .mergeMap(async () => { try { const statusCode = await fetchResponse(); if (statusCode === 200) return true; @@ -35,17 +36,24 @@ const timedOut = timeout => { }); }; -const convert = async() => { +const convert = async () => { await waitForServerReachable().first().toPromise(); console.log('Connected to server ...'); console.log('Exporting ...'); try { const directories = getResumesFromDirectories(); - directories.forEach(async(dir) => { - const browser = await puppeteer.launch({args: ['--no-sandbox']}); + directories.forEach(async (dir) => { + const browser = await puppeteer.launch({ + args: ['--no-sandbox'] + }); const page = await browser.newPage(); - await page.goto('http://localhost:8080/#/resume/' + dir.name, {waitUntil: 'networkidle', networkIdleTimeout: 5E3}); - await page.pdf({path: path.join(__dirname, '../pdf/' + dir.name + '.pdf'), format: 'A4'}); + await page.goto(`http://localhost:${config.dev.port}/#/resume/` + dir.name, { + waitUntil: 'networkidle2' + }); + await page.pdf({ + path: path.join(__dirname, '../pdf/' + dir.name + '.pdf'), + format: 'A4' + }); await browser.close(); }); } catch (err) { diff --git a/src/lang/ca.js b/src/lang/ca.js index c428ffb..6d258aa 100644 --- a/src/lang/ca.js +++ b/src/lang/ca.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const ca = { - headings: { - contact: 'Contacte', - experience: 'Experiència', - education: 'Educació', - skills: 'Habilitats', - about: 'Sobre mi' - } +const lang = { + contact: 'Contacte', + experience: 'Experiència', + education: 'Educació', + skills: 'Habilitats', + about: 'Sobre mi' }; -export default ca; +export default lang; diff --git a/src/lang/cn.js b/src/lang/cn.js index 230b93c..bca7680 100755 --- a/src/lang/cn.js +++ b/src/lang/cn.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const cn = { - headings: { - contact: '联系方式', - experience: '工作经历', - education: '教育经历', - skills: '技能专长', - about: '自我介绍' - } +const lang = { + contact: '联系方式', + experience: '工作经历', + education: '教育经历', + skills: '技能专长', + about: '自我介绍' }; -export default cn; +export default lang; diff --git a/src/lang/de.js b/src/lang/de.js index f80a686..dfa05ef 100755 --- a/src/lang/de.js +++ b/src/lang/de.js @@ -1,11 +1,10 @@ -/* eslint-disable */ -const de = { - headings: { - contact: 'Kontakt', - experience: 'Berufserfahrung', - education: 'Schulbildung', - skills: 'Qualifikationen', - about: 'Über mich' - } +const lang = { + contact: 'Kontakt', + born: 'Geboren', + bornIn: 'in', + experience: 'Berufserfahrung', + education: 'Schulbildung', + skills: 'Qualifikationen', + about: 'Über mich' }; -export default de; +export default lang; diff --git a/src/lang/el.js b/src/lang/el.js index b2de798..afb16b0 100755 --- a/src/lang/el.js +++ b/src/lang/el.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const el = { - headings: { - contact: 'Επικοινωνία', - experience: 'Επαγγελματική εμπειρία', - education: 'Εκπαίδευση', - skills: 'Δεξιότητες', - about: 'Σχετικά με εμένα' - } +const lang = { + contact: 'Επικοινωνία', + experience: 'Επαγγελματική εμπειρία', + education: 'Εκπαίδευση', + skills: 'Δεξιότητες', + about: 'Σχετικά με εμένα' }; -export default el; +export default lang; diff --git a/src/lang/en.js b/src/lang/en.js index 7d64be1..2a918a7 100755 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -1,11 +1,10 @@ -/* eslint-disable */ -const en = { - headings: { - contact: 'Contact', - experience: 'Experience', - education: 'Education', - skills: 'Skills', - about: 'About me' - } +const lang = { + contact: 'Contact', + born: 'Born', + bornIn: 'in', + experience: 'Experience', + education: 'Education', + skills: 'Skills', + about: 'About me' }; -export default en; +export default lang; diff --git a/src/lang/es.js b/src/lang/es.js index 308a167..99c6c12 100755 --- a/src/lang/es.js +++ b/src/lang/es.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const es = { - headings: { - contact: 'Contacto', - experience: 'Experiencia', - education: 'Educación', - skills: 'Habilidades', - about: 'Sobre mi' - } +const lang = { + contact: 'Contacto', + experience: 'Experiencia', + education: 'Educación', + skills: 'Habilidades', + about: 'Sobre mi' }; -export default es; +export default lang; diff --git a/src/lang/fr.js b/src/lang/fr.js index 8b2ec0f..341a1f7 100755 --- a/src/lang/fr.js +++ b/src/lang/fr.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const fr = { - headings: { - contact: 'Contact', - experience: 'Expérience professionelle', - education: 'Formation', - skills: 'Compétences', - about: 'À propos de moi' - } +const lang = { + contact: 'Contact', + experience: 'Expérience professionelle', + education: 'Formation', + skills: 'Compétences', + about: 'À propos de moi' }; -export default fr; +export default lang; diff --git a/src/lang/he.js b/src/lang/he.js index a4b2925..693006c 100755 --- a/src/lang/he.js +++ b/src/lang/he.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const he = { - headings: { - contact: 'יצירת קשר', - experience: 'ניסיון', - education: 'השכלה', - skills: 'כישורים', - about: 'תמצית' - } +const lang = { + contact: 'יצירת קשר', + experience: 'ניסיון', + education: 'השכלה', + skills: 'כישורים', + about: 'תמצית' }; -export default he; +export default lang; diff --git a/src/lang/hu.js b/src/lang/hu.js index 6744364..3831db6 100755 --- a/src/lang/hu.js +++ b/src/lang/hu.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const hu = { - headings: { - contact: 'Kapcsolat', - experience: 'Munkatapasztalat', - education: 'Tanulmány', - skills: 'Készségek', - about: 'Rólam' - } +const lang = { + contact: 'Kapcsolat', + experience: 'Munkatapasztalat', + education: 'Tanulmány', + skills: 'Készségek', + about: 'Rólam' }; -export default hu; +export default lang; diff --git a/src/lang/id.js b/src/lang/id.js index d9003f6..b1aa0e2 100755 --- a/src/lang/id.js +++ b/src/lang/id.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const id = { - headings: { - contact: "Kontak", - experience: "Pengalaman", - education: "Pendidikan", - skills: "Keterampilan", - about: "Tentang Saya" - } -}; -export default id; +const lang = { + contact: 'Kontak', + experience: 'Pengalaman', + education: 'Pendidikan', + skills: 'Keterampilan', + about: 'Tentang Saya' +}; +export default lang; diff --git a/src/lang/it.js b/src/lang/it.js index d8fa490..56ab8b1 100755 --- a/src/lang/it.js +++ b/src/lang/it.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const it = { - headings: { - contact: 'Contatti', - experience: 'Esperienza professionale', - education: 'Formazione', - skills: 'Competenze', - about: 'Su di me' - } +const lang = { + contact: 'Contatti', + experience: 'Esperienza professionale', + education: 'Formazione', + skills: 'Competenze', + about: 'Su di me' }; -export default it; +export default lang; diff --git a/src/lang/ja.js b/src/lang/ja.js index 9187359..567178b 100755 --- a/src/lang/ja.js +++ b/src/lang/ja.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const jp = { - headings: { - contact: '連絡先', - experience: '職務経歴', - education: '学歴', - skills: 'スキル', - about: '自己紹介' - } +const lang = { + contact: '連絡先', + experience: '職務経歴', + education: '学歴', + skills: 'スキル', + about: '自己紹介' }; -export default jp; +export default lang; diff --git a/src/lang/ka.js b/src/lang/ka.js index d1f9f5a..9ef6be0 100755 --- a/src/lang/ka.js +++ b/src/lang/ka.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const ka = { - headings: { - contact: 'კონტაქტი', - experience: 'გამოცდილება', - education: 'განათლება', - skills: 'უნარები', - about: 'ჩემ შესახებ' - } +const lang = { + contact: 'კონტაქტი', + experience: 'გამოცდილება', + education: 'განათლება', + skills: 'უნარები', + about: 'ჩემ შესახებ' }; -export default ka; +export default lang; diff --git a/src/lang/ko.js b/src/lang/ko.js index 51ec756..89e65e5 100644 --- a/src/lang/ko.js +++ b/src/lang/ko.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const ko = { - headings: { - contact: "연락처", - experience: "경력", - education: "학력", - skills: "보유스킬", - about: "자기소개" - } - }; - export default ko; +const lang = { + contact: '연락처', + experience: '경력', + education: '학력', + skills: '보유스킬', + about: '자기소개' +}; +export default lang; diff --git a/src/lang/lt.js b/src/lang/lt.js index b310458..2f40eac 100755 --- a/src/lang/lt.js +++ b/src/lang/lt.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const lt = { - headings: { - contact: 'Kontaktai', - experience: 'Patirtis', - education: 'Išsilavinimas', - skills: 'Įgūdžiai', - about: 'Apie mane' - } +const lang = { + contact: 'Kontaktai', + experience: 'Patirtis', + education: 'Išsilavinimas', + skills: 'Įgūdžiai', + about: 'Apie mane' }; -export default lt; +export default lang; diff --git a/src/lang/nl.js b/src/lang/nl.js index 95a3c87..5d4e832 100755 --- a/src/lang/nl.js +++ b/src/lang/nl.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const nl = { - headings: { - contact: 'Contact', - experience: 'Ervaringen', - education: 'Opleidingen', - skills: 'Skills', - about: 'Over mij' - } - }; - export default nl; \ No newline at end of file +const lang = { + contact: 'Contact', + experience: 'Ervaringen', + education: 'Opleidingen', + skills: 'Skills', + about: 'Over mij' +}; +export default lang; diff --git a/src/lang/pl.js b/src/lang/pl.js index 05fc70e..dfbc1a5 100755 --- a/src/lang/pl.js +++ b/src/lang/pl.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const pl = { - headings: { - contact: 'Kontakt', - experience: 'Doświadczenie', - education: 'Wykształcenie', - skills: 'Umiejętności', - about: 'O mnie' - } +const lang = { + contact: 'Kontakt', + experience: 'Doświadczenie', + education: 'Wykształcenie', + skills: 'Umiejętności', + about: 'O mnie' }; -export default pl; +export default lang; diff --git a/src/lang/pt-br.js b/src/lang/pt-br.js index 45be071..864e7f2 100755 --- a/src/lang/pt-br.js +++ b/src/lang/pt-br.js @@ -1,11 +1,9 @@ -/* eslint-disable */ -const ptbr = { - headings: { - contact: 'Contato', - experience: 'Experiência Profissional', - education: 'Educação', - skills: 'Competências', - about: 'Sobre' - } +const lang = { + contact: 'Contato', + experience: 'Experiência Profissional', + /* You can choose, "Educação" or "Formação Acadêmica"! But the second one is more professional and is more used. */ + education: 'Formação Acadêmica', + skills: 'Competências', + about: 'Sobre' }; -export default ptbr; +export default lang; diff --git a/src/lang/pt.js b/src/lang/pt.js index bf87f02..0588bf5 100755 --- a/src/lang/pt.js +++ b/src/lang/pt.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const pt = { - headings: { - contact: 'Contactos', - experience: 'Experiência Profissional', - education: 'Educação', - skills: 'Competências', - about: 'Sobre mim' - } +const lang = { + contact: 'Contactos', + experience: 'Experiência Profissional', + education: 'Educação', + skills: 'Competências', + about: 'Sobre mim' }; -export default pt; +export default lang; diff --git a/src/lang/ru.js b/src/lang/ru.js index 81c1510..85ee0d2 100755 --- a/src/lang/ru.js +++ b/src/lang/ru.js @@ -1,13 +1,9 @@ -/* eslint-disable */ - -const ru = { - headings: { - contact: "Контакты", - experience: "Опыт", - education: "Обучение", - skills: "Навыки", - about: "Обо мне" - } +const lang = { + contact: 'Контакты', + experience: 'Опыт', + education: 'Образование', + skills: 'Навыки', + about: 'Обо мне' }; -export default ru; \ No newline at end of file +export default lang; diff --git a/src/lang/sv.js b/src/lang/sv.js index 1e894e3..1debecc 100755 --- a/src/lang/sv.js +++ b/src/lang/sv.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const sv = { - headings: { - contact: 'Kontakt', - experience: 'Arbetslivserfarenhet', - education: 'Utbildning', - skills: 'Kunskaper', - about: 'Om mig' - } +const lang = { + contact: 'Kontakt', + experience: 'Arbetslivserfarenhet', + education: 'Utbildning', + skills: 'Kunskaper', + about: 'Om mig' }; -export default sv; +export default lang; diff --git a/src/lang/th.js b/src/lang/th.js index 1f4aca5..1898719 100755 --- a/src/lang/th.js +++ b/src/lang/th.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const th = { - headings: { - contact: 'ข้อมูลติดต่อ', - experience: 'ประสบการณ์ทำงาน', - education: 'ประวัติการศึกษา', - skills: 'ทักษะและความสามารถ', - about: 'ข้อมูลส่วนตัว' - } +const lang = { + contact: 'ข้อมูลติดต่อ', + experience: 'ประสบการณ์ทำงาน', + education: 'ประวัติการศึกษา', + skills: 'ทักษะและความสามารถ', + about: 'ข้อมูลส่วนตัว' }; -export default th; +export default lang; diff --git a/src/lang/tr.js b/src/lang/tr.js index 42e6372..8d4624a 100755 --- a/src/lang/tr.js +++ b/src/lang/tr.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const tr = { - headings: { - contact: 'İletişim', - experience: 'Deneyim', - education: 'Eğitim', - skills: 'Yetenekler', - about: 'Hakkımda' - } +const lang = { + contact: 'İletişim', + experience: 'Deneyim', + education: 'Eğitim', + skills: 'Yetenekler', + about: 'Hakkımda' }; -export default tr; +export default lang; diff --git a/src/lang/zh-tw.js b/src/lang/zh-tw.js index d712b91..4404121 100755 --- a/src/lang/zh-tw.js +++ b/src/lang/zh-tw.js @@ -1,11 +1,8 @@ -/* eslint-disable */ -const zhtw = { - headings: { - contact: '聯絡方式', - experience: '經歷', - education: '學歷', - skills: '技能專長', - about: '自我介紹' - } +const lang = { + contact: '聯絡方式', + experience: '經歷', + education: '學歷', + skills: '技能專長', + about: '自我介紹' }; -export default zhtw; +export default lang; diff --git a/src/resumes/left-right-rtl.vue b/src/resumes/left-right-rtl.vue index c190b76..324293a 100755 --- a/src/resumes/left-right-rtl.vue +++ b/src/resumes/left-right-rtl.vue @@ -13,7 +13,7 @@
-

{{ lang.headings.experience }}

+

{{ lang.experience }}

{{experience.company}} {{experience.position}} @@ -22,7 +22,7 @@
-

{{ lang.headings.contact }}

+

{{ lang.contact }}

@@ -49,13 +49,13 @@
-

{{ lang.headings.education }}

+

{{ lang.education }}

{{education.degree}} {{education.description}}
-

{{ lang.headings.skills }}

+

{{ lang.skills }}

{{skill.name}} diff --git a/src/resumes/left-right.vue b/src/resumes/left-right.vue index f7b9faf..4e700bb 100755 --- a/src/resumes/left-right.vue +++ b/src/resumes/left-right.vue @@ -13,7 +13,7 @@
-

{{ lang.headings.experience }}

+

{{ lang.experience }}

{{experience.company}} {{experience.position}} @@ -22,7 +22,7 @@
-

{{ lang.headings.contact }}

+

{{ lang.contact }}

@@ -49,13 +49,13 @@
-

{{ lang.headings.education }}

+

{{ lang.education }}

{{education.degree}} {{education.description}}
-

{{ lang.headings.skills }}

+

{{ lang.skills }}

{{skill.name}} diff --git a/src/resumes/material-dark.vue b/src/resumes/material-dark.vue index 0717023..3a25552 100755 --- a/src/resumes/material-dark.vue +++ b/src/resumes/material-dark.vue @@ -5,7 +5,7 @@
- {{ lang.headings.contact }} + {{ lang.contact }}
@@ -13,7 +13,7 @@
    -
  • Born {{person.birth.year}} in {{person.birth.location}}
  • +
  • {{ lang.born }} {{person.birth.year}} {{ lang.bornIn }} {{person.birth.location}}
@@ -77,7 +77,7 @@
- {{ lang.headings.skills }} + {{ lang.skills }}
@@ -98,7 +98,7 @@
{{person.position}}
-
{{ lang.headings.experience }}
+
{{ lang.experience }}

{{experience.position}} - {{experience.company}}

@@ -107,7 +107,7 @@ {{experience.description}}

-
{{ lang.headings.education }}
+
{{ lang.education }}
{{education.degree}}
diff --git a/src/resumes/oblique.vue b/src/resumes/oblique.vue index e026f2e..9bfebb4 100755 --- a/src/resumes/oblique.vue +++ b/src/resumes/oblique.vue @@ -16,7 +16,7 @@
-

{{ lang.headings.experience }}

+

{{ lang.experience }}

@@ -32,7 +32,7 @@
-

{{ lang.headings.education }}

+

{{ lang.education }}

{{education.degree}} @@ -43,7 +43,7 @@
-

{{ lang.headings.skills }}

+

{{ lang.skills }}

details @@ -55,7 +55,7 @@ {{person.knowledge}}
-

{{ lang.headings.contact }}

+

{{ lang.contact }}

{{person.contact.email}} {{person.contact.phone}} diff --git a/src/resumes/options.js b/src/resumes/options.js index 61c7ffd..cc3de95 100755 --- a/src/resumes/options.js +++ b/src/resumes/options.js @@ -1,6 +1,10 @@ import yaml from 'js-yaml'; -import { PERSON } from '../../resume/data.yml'; -import { terms } from '../terms'; +import { + PERSON +} from '../../resume/data.yml'; +import { + terms +} from '../terms'; // Called by templates to decrease redundancy function getVueOptions (name) { @@ -14,11 +18,24 @@ function getVueOptions (name) { }, computed: { lang () { - return this.terms[this.person.lang]; + const defaultLang = this.terms.en; + const useLang = this.terms[this.person.lang]; + + // overwrite non-set fields with default lang + Object.keys(defaultLang) + .filter(k => !useLang[k]) + .forEach(k => { + console.log(k); + useLang[k] = defaultLang[k]; + }); + + return useLang; } } }; return opt; } -export { getVueOptions }; +export { + getVueOptions +}; diff --git a/src/resumes/purple.vue b/src/resumes/purple.vue index dd0e44c..fdbb2e5 100755 --- a/src/resumes/purple.vue +++ b/src/resumes/purple.vue @@ -18,7 +18,7 @@
-

{{ lang.headings.experience }}

+

{{ lang.experience }}

{{experience.company}}

@@ -34,7 +34,7 @@
-

{{ lang.headings.education }}

+

{{ lang.education }}

{{education.description}}

@@ -42,7 +42,7 @@
-

{{ lang.headings.skills }}

+

{{ lang.skills }}

{{person.knowledge}}

    @@ -56,7 +56,7 @@
diff --git a/src/resumes/side-bar-rtl.vue b/src/resumes/side-bar-rtl.vue index e164d21..b364374 100755 --- a/src/resumes/side-bar-rtl.vue +++ b/src/resumes/side-bar-rtl.vue @@ -15,7 +15,7 @@
-

{{ lang.headings.contact }}

+

{{ lang.contact }}

@@ -47,7 +47,7 @@
-

{{ lang.headings.experience }}

+

{{ lang.experience }}

{{experience.company}} - @@ -62,7 +62,7 @@
-

{{ lang.headings.education }}

+

{{ lang.education }}

{{education.degree}} @@ -73,7 +73,7 @@
-

{{ lang.headings.skills }}

+

{{ lang.skills }}

{{skill.name}} diff --git a/src/resumes/side-bar.vue b/src/resumes/side-bar.vue index f704503..f1ae426 100755 --- a/src/resumes/side-bar.vue +++ b/src/resumes/side-bar.vue @@ -15,7 +15,7 @@
-

{{ lang.headings.contact }}

+

{{ lang.contact }}

@@ -47,7 +47,7 @@
-

{{ lang.headings.experience }}

+

{{ lang.experience }}

{{experience.company}} - @@ -62,7 +62,7 @@
-

{{ lang.headings.education }}

+

{{ lang.education }}

{{education.degree}} @@ -73,7 +73,7 @@
-

{{ lang.headings.skills }}

+

{{ lang.skills }}

{{skill.name}}
{{person.contact.email}}