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

Commit

Permalink
update node and npm versions to latest LTS
Browse files Browse the repository at this point in the history
  • Loading branch information
zaggino committed May 16, 2016
1 parent 0894803 commit ef2613d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
8 changes: 4 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ module.exports = function (grunt) {
},
"node-win": {
"dest" : "<%= downloads %>",
"src" : ["http://nodejs.org/dist/v<%= node.version %>/node.exe",
"http://nodejs.org/dist/npm/npm-<%= npm.version %>.zip"]
"src" : ["http://nodejs.org/dist/v<%= node.version %>/win-x86/node.exe",
"http://registry.npmjs.org/npm/-/npm-<%= npm.version %>.tgz"]
}
},
"clean": {
Expand Down Expand Up @@ -227,10 +227,10 @@ module.exports = function (grunt) {
"version" : "3.2623.1397"
},
"node": {
"version" : "0.10.24"
"version" : "4.2.3"
},
"npm": {
"version" : "1.2.11"
"version" : "2.14.15"
}
});

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
"grunt-contrib-copy": "0.5.0",
"grunt-contrib-clean": "0.4.0",
"guid": "0.0.10",
"gunzip-maybe": "^1.2.1",
"grunt-curl": "2.0.2",
"grunt-shell": "0.2.1",
"q": "0.9.2",
"semver": "^4.1.0"
"semver": "^4.1.0",
"tar-fs": "^1.8.1"
},
"scripts": {
"preinstall": "bash -c 'mv appshell.gyp .appshell.gyp'",
Expand Down
20 changes: 13 additions & 7 deletions tasks/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ module.exports = function (grunt) {

var common = require("./common")(grunt),
fs = require("fs"),
gunzip = require("gunzip-maybe"),
tar = require("tar-fs"),
child_process = require("child_process"),
path = require("path"),
q = require("q"),
Expand Down Expand Up @@ -386,13 +388,17 @@ module.exports = function (grunt) {
grunt.file.copy(exeFile, "deps/node/node.exe");

// unzip NPM
unzip(npmFile, "deps/node").then(function () {
nodeWriteVersion();
done();
}, function (err) {
grunt.log.error(err);
done(false);
});
fs.createReadStream(npmFile)
.pipe(gunzip())
.pipe(tar.extract("deps/node"))
.on("error", function (err) {
grunt.log.error(err);
done(false);
})
.on("finish", function () {
nodeWriteVersion();
done();
});
});

// task: node-mac
Expand Down

0 comments on commit ef2613d

Please sign in to comment.