resume/src/resumes/options.js
2017-10-21 14:02:27 +02:00

25 lines
459 B
JavaScript
Executable File

import yaml from 'js-yaml';
import { PERSON } from '../../resume/data.yml';
import { terms } from '../terms';
// Called by templates to decrease redundancy
function getVueOptions (name) {
let opt = {
name: name,
data () {
return {
person: yaml.load(PERSON),
terms: terms
};
},
computed: {
lang () {
return this.terms[this.person.lang];
}
}
};
return opt;
}
export { getVueOptions };