mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 22:09:57 +02:00
16 lines
378 B
Plaintext
16 lines
378 B
Plaintext
// usage: ../../../node_modules/.bin/phantomjs <html> <png>
|
|
var system = require('system');
|
|
var html = system.args[1];
|
|
var png = system.args[2];
|
|
console.log('png:', png)
|
|
var page = require('webpage').create(),
|
|
loadInProgress = false,
|
|
fs = require('fs');
|
|
|
|
page.open(html);
|
|
page.onLoadFinished = function() {
|
|
loadInProgress = false;
|
|
page.render(png);
|
|
phantom.exit();
|
|
}
|