mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-15 05:19:58 +02:00
Replace require with import
This commit is contained in:
16
test/fixtures/samples/load_html_save_screenshot_png.js
vendored
Normal file
16
test/fixtures/samples/load_html_save_screenshot_png.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
// usage: ../../../node_modules/.bin/phantomjs <html> <png>
|
||||
import system from 'system'
|
||||
import webpage from 'webpage'
|
||||
|
||||
const html = system.args[1]
|
||||
const png = system.args[2]
|
||||
console.log('png:', png)
|
||||
|
||||
const page = webpage.create()
|
||||
|
||||
page.open(html)
|
||||
page.onLoadFinished = function () {
|
||||
page.render(png)
|
||||
global.phantom.exit()
|
||||
}
|
Reference in New Issue
Block a user