Replace require with import

This commit is contained in:
Tyler Long
2017-09-10 19:41:34 +08:00
parent 969faf91fe
commit c9442653e9
41 changed files with 179 additions and 253 deletions

View File

@@ -5,6 +5,9 @@
* - Thanks to the grunticon project for some guidance
* https://github.com/filamentgroup/grunticon
*/
import system from 'system'
import fs from 'fs'
import webpage from 'webpage'
window.phantom.onError = function (msg, trace) {
var msgStack = ['PHANTOM ERROR: ' + msg]
@@ -24,10 +27,6 @@ window.phantom.onError = function (msg, trace) {
window.phantom.exit(1)
}
var system = require('system')
var fs = require('fs')
var webpage = require('webpage')
var page = webpage.create()
var files = system.args.slice(10, system.args.length)
var width = system.args[8]