Make XHR request in CLI with xhr2 package.

This commit is contained in:
Dillon Kearns 2019-10-21 08:40:22 -07:00
parent 3afce2a649
commit d1d6d91fa8
3 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,5 @@
const { compileToString } = require("node-elm-compiler");
XMLHttpRequest = require("xhr2");
module.exports = runElm;
function runElm(callback) {

5
package-lock.json generated
View File

@ -12835,6 +12835,11 @@
"xtend": "^4.0.0"
}
},
"xhr2": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.2.0.tgz",
"integrity": "sha512-BDtiD0i2iKPK/S8OAZfpk6tyzEDnKKSjxWHcMBVmh+LuqJ8A32qXTyOx+TVOg2dKvq6zGBq2sgKPkEeRs1qTRA=="
},
"xml-parse-from-string": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/xml-parse-from-string/-/xml-parse-from-string-1.0.1.tgz",

View File

@ -46,7 +46,8 @@
"webpack-dev-middleware": "^3.7.0",
"webpack-dev-server": "^3.8.0",
"webpack-merge": "^4.2.1",
"workbox-webpack-plugin": "^4.3.1"
"workbox-webpack-plugin": "^4.3.1",
"xhr2": "^0.2.0"
},
"devDependencies": {
"@types/chokidar": "^2.1.3",