mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-25 09:50:11 +00:00
Merge JSON properties onto sheet.
This commit is contained in:
parent
efd6206462
commit
ed3fc12806
@ -61,7 +61,7 @@ module.exports = function () {
|
|||||||
var finished = targets.map( gen );
|
var finished = targets.map( gen );
|
||||||
|
|
||||||
return {
|
return {
|
||||||
sheet: rez.rep,
|
sheet: rez,//.rep,
|
||||||
targets: targets,
|
targets: targets,
|
||||||
processed: finished
|
processed: finished
|
||||||
};
|
};
|
||||||
|
@ -6,6 +6,7 @@ Abstract character/resume sheet representation.
|
|||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
var FS = require('fs');
|
var FS = require('fs');
|
||||||
|
var extend = require('./extend');
|
||||||
|
|
||||||
function Sheet() {
|
function Sheet() {
|
||||||
this.id = null;
|
this.id = null;
|
||||||
@ -15,9 +16,11 @@ Abstract character/resume sheet representation.
|
|||||||
}
|
}
|
||||||
|
|
||||||
Sheet.prototype.open = function( file, title ) {
|
Sheet.prototype.open = function( file, title ) {
|
||||||
this.rep = JSON.parse( FS.readFileSync( file, 'utf8' ) );
|
var rep = JSON.parse( FS.readFileSync( file, 'utf8' ) );
|
||||||
|
extend( true, this, rep );
|
||||||
|
console.log( this );
|
||||||
this.fileName = file;
|
this.fileName = file;
|
||||||
this.title = title || this.rep.basics.name;
|
this.title = title || this.basics.name;
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user