Download Quartz and PerformanceBezier from github

This commit is contained in:
Horcrux
2017-11-07 18:49:53 +08:00
parent 7e1cb4de3f
commit 2998aa1bb6
30 changed files with 25 additions and 3822 deletions
+20
View File
@@ -0,0 +1,20 @@
var path = require('path');
var ghdownload = require('github-download');
function downloadSubModuleFromGithub(user, repo, callback) {
var dist = path.join(process.cwd(), 'ios/' + repo);
console.log('\r\n Start downloading ' + repo + ' to `' + dist + '`');
ghdownload({user: user, repo: repo, ref: 'master'}, dist)
.on('end', function() {
console.log('Download ' + repo + ' library success!');
callback && callback();
})
.on('error', function (err) {
console.error('Download ' + repo + ' library from github failed with err:', err);
});
}
downloadSubModuleFromGithub('adamwulf', 'PerformanceBezier', function () {
downloadSubModuleFromGithub('magicismight', 'QuartzBookPack');
});