mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Merge branch 'master' of github.com:bestiejs/lodash
Conflicts: build/post-install.js Former-commit-id: 793ebf1f983d4077c7b333c9305958a409e18d95
This commit is contained in:
@@ -7,8 +7,8 @@
|
|||||||
zlib = require('zlib'),
|
zlib = require('zlib'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
https = require('https'),
|
https = require('https'),
|
||||||
tar = require('tar'),
|
exec = require('child_process').exec,
|
||||||
npm = require('npm');
|
tar = require('tar');
|
||||||
|
|
||||||
/** The directory that is the base of the repository */
|
/** The directory that is the base of the repository */
|
||||||
var basePath = fs.realpathSync(path.join(__dirname, '..'));
|
var basePath = fs.realpathSync(path.join(__dirname, '..'));
|
||||||
@@ -58,32 +58,27 @@
|
|||||||
}).on('error', callback);
|
}).on('error', callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
npm.load({
|
exec('npm -g root', function(exception, stdout, stderr) {
|
||||||
'global': true
|
if (exception || stderr) {
|
||||||
}, function(exception) {
|
console.error('There was a problem loading the npm registry.');
|
||||||
console.log(path.resolve(basePath, '..'), npm.root);
|
|
||||||
if (exception) {
|
|
||||||
process.stderr.write('There was a problem loading the npm registry.');
|
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
} else {
|
} else if (path.resolve(basePath, '..') == stdout.trim()) {
|
||||||
if (path.resolve(basePath, '..') == npm.root) {
|
// download Closure Compiler
|
||||||
// download Closure Compiler
|
getDependency('aa29a2ecf6f51d4da5a2a418c0d4ea0e368ee80d', vendorPath, function(exception) {
|
||||||
getDependency('aa29a2ecf6f51d4da5a2a418c0d4ea0e368ee80d', vendorPath, function(exception) {
|
var statusCode = 0;
|
||||||
var statusCode = 0;
|
if (exception) {
|
||||||
|
console.error('There was a problem downloading the Closure Compiler.');
|
||||||
|
statusCode = 1;
|
||||||
|
}
|
||||||
|
// download UglifyJS
|
||||||
|
getDependency('827f406a02626c1c6723e8ae281b6785d36375c1', vendorPath, function(exception) {
|
||||||
if (exception) {
|
if (exception) {
|
||||||
process.stderr.write('There was a problem downloading Closure Compiler.');
|
console.error('There was a problem downloading UglifyJS.');
|
||||||
statusCode = 1;
|
statusCode = 1;
|
||||||
}
|
}
|
||||||
// download UglifyJS
|
process.exit(statusCode);
|
||||||
getDependency('827f406a02626c1c6723e8ae281b6785d36375c1', vendorPath, function(exception) {
|
|
||||||
if (exception) {
|
|
||||||
process.stderr.write('There was a problem downloading UglifyJS.');
|
|
||||||
statusCode = 1;
|
|
||||||
}
|
|
||||||
process.exit(statusCode);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|||||||
@@ -27,9 +27,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tar": "~0.1.13"
|
"tar": "~0.1.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
|
||||||
"npm": "~1.1.63"
|
|
||||||
},
|
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/bestiejs/lodash/issues"
|
"url": "https://github.com/bestiejs/lodash/issues"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user