Commit 1baf6278 by Alexander Bazo

Remove dependencies to download-cli

parent 25d25db4
/* eslint-env node */
// Downloads gaze client library from https://lab.las3.de/gitlab/eye-tracking-classroom/gaze-client.js
const https = require("https"),
fs = require("fs"),
fileList = [{
url: "https://lab.las3.de/gitlab/eye-tracking-classroom/gaze-client.js/raw/master/build/gazeclient.js",
localPath: "vendors/gazeclient.js",
},
{
url: "https://lab.las3.de/gitlab/eye-tracking-classroom/gaze-client.js/raw/master/build/gazeclient.js.map",
localPath: "vendors/gazeclient.js.map",
},
{
url: "https://lab.las3.de/gitlab/eye-tracking-classroom/gaze-client.js/raw/master/build/gazeclient.min.js",
localPath: "vendors/gazeclient.min.js",
},
];
function downloadFile(source, target) {
let file = fs.createWriteStream(target);
https.get(source, function(response) {
response.pipe(file);
});
}
for (let i = 0; i < fileList.length; i++) {
let file = fileList[i];
downloadFile(file.url, file.localPath);
}
\ No newline at end of file
...@@ -5,14 +5,12 @@ ...@@ -5,14 +5,12 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "npm run downloadClientLibrary", "postinstall": "node get-gaze-client.js",
"downloadClientLibrary": "download --out vendors https://lab.las3.de/gitlab/eye-tracking-classroom/gaze-client.js/raw/master/build/gazeclient.js",
"start": "http-server -o" "start": "http-server -o"
}, },
"author": "Alexander Bazo <alexanderbazo@googlemail.com>", "author": "Alexander Bazo <alexanderbazo@googlemail.com>",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"download-cli": "^1.1.1",
"http-server": "^0.11.1" "http-server": "^0.11.1"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment