Replace require with import

This commit is contained in:
Tyler Long
2017-09-10 21:23:04 +08:00
parent c9442653e9
commit a7d79baf00
36 changed files with 693 additions and 838 deletions

View 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()
}