Skip to content
Permalink
Browse files

saving work done on HTML-only cards so far

  • Loading branch information...
shawnmjones committed Aug 29, 2018
1 parent 1b46df6 commit 2054034eb255380a601f96ddd06543ccccd37a6c
Showing with 669 additions and 0 deletions.
  1. +28 −0 mementoembed/static/js/dom-manipulation-renameme.js
  2. +641 −0 package-lock.json
@@ -0,0 +1,28 @@
const jsdom = require('jsdom');
var fs = require('fs');

const { JSDOM } = jsdom;

const dom = new JSDOM( process.env.CARD_DATA );

// intentionally global, do not set with var
document = dom.window.document;

require('./mementoembed-v20180806.js');

var output = document.getElementsByTagName('body')[0].innerHTML;

// console.log("==== OUTPUT STARTS HERE ====");

// console.log(output);

// console.log("==== OUTPUT ENDS HERE ====");

fs.writeFile(process.env.OUTPUT_FILE, output, function(err) {

if (err) {
return console.log(err);
}

console.log("output written to " + process.env.OUTPUT_FILE);
});
Oops, something went wrong.

0 comments on commit 2054034

Please sign in to comment.
You can’t perform that action at this time.