Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit 4450618

Browse files
committed
- update to grunt-curl 2.0.2 which resolved the out of memory with node. This makes my interim solution obsolete.
1 parent f3cf619 commit 4450618

File tree

2 files changed

+3
-42
lines changed

2 files changed

+3
-42
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"grunt-contrib-copy": "0.4.0",
1919
"grunt-contrib-clean": "0.4.0",
2020
"guid": "0.0.10",
21-
"grunt-curl": "0.5.0",
21+
"grunt-curl": "2.0.2",
2222
"grunt-shell": "0.2.1",
2323
"q": "0.9.2",
2424
"semver": "2.0.11"
@@ -28,4 +28,4 @@
2828
"install": "",
2929
"postinstall": "bash -c 'mv .appshell.gyp appshell.gyp;'"
3030
}
31-
}
31+
}

tasks/setup.js

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,6 @@ module.exports = function (grunt) {
6767
return exec("unzip -q \"" + src + "\" -d \"" + dest + "\"");
6868
}
6969

70-
function curl(src, dest) {
71-
if (process.platform === "win32") {
72-
var dest = dest.replace(/\\/g, "/");
73-
}
74-
75-
grunt.verbose.writeln("Downloading " + src + " to " + dest);
76-
var cmd = "curl -o \"" + dest + "\" \"" + src + "\"";
77-
return exec(cmd);
78-
}
79-
8070
// task: cef
8171
grunt.registerTask("cef", "Download and setup CEF", function () {
8272
var config = "cef-" + platform + common.arch(),
@@ -137,34 +127,6 @@ module.exports = function (grunt) {
137127
grunt.task.run("curl-dir:" + grunt.config("cefConfig"));
138128
});
139129

140-
grunt.registerTask("curl-download", function () {
141-
var downloadConfig = arguments[0],
142-
downloadSource = grunt.config("curl-dir." + downloadConfig + ".src"),
143-
downloadDest = path.join(process.cwd(), grunt.config("curl-dir." + downloadConfig + ".dest")),
144-
downloadSourceURLS = downloadSource,
145-
done = this.async();
146-
147-
if (!Array.isArray(downloadSource)) {
148-
downloadSourceURLS = [];
149-
downloadSourceURLS.push(downloadSource);
150-
}
151-
152-
// ensure the download directory exists
153-
fs.mkdirSync(downloadDest);
154-
155-
var promises = downloadSourceURLS.map(function (srcUrl) {
156-
var filename = path.basename(srcUrl),
157-
dest = path.join(downloadDest, filename);
158-
159-
grunt.verbose.writeln("Download " + srcUrl + " to " + dest);
160-
return curl(srcUrl, dest);
161-
});
162-
163-
q.all(promises).then(done).catch(function (err) {
164-
done(err);
165-
});
166-
});
167-
168130
function cefFileLocation() {
169131
return path.resolve(process.cwd(), "deps/cef");
170132
}
@@ -290,8 +252,7 @@ module.exports = function (grunt) {
290252
grunt.log.writeln("Downloading " + downloadConfig + ". This may take a while...");
291253
// curl doesn't give me the option to handle download errors on my own. If the requested file can't
292254
// be found, curl will log an error to the console.
293-
//grunt.task.run("curl-dir:" + downloadConfig);
294-
grunt.task.run("curl-download:" + downloadConfig);
255+
grunt.task.run("curl-dir:" + downloadConfig);
295256
});
296257

297258
// task: cef-extract

0 commit comments

Comments
 (0)