added to packages.json

This commit is contained in:
dabura667 2015-07-21 03:39:15 +09:00
parent bc0bddd5cb
commit badf79e134
2 changed files with 14 additions and 15 deletions

View File

@ -6,19 +6,16 @@ var fs = require('fs');
var path = require('path');
var https = require('https');
var AdmZip = require('adm-zip');
var bhttp = require("bhttp");
var bhttp = require('bhttp');
var crowdin_identifier = 'copay'
var crowdin_file_name1 = 'files[template.pot]'
var local_file_name1 = path.join(__dirname, 'po/template.pot')
var local_file1 = fs.createReadStream(local_file_name1)
var crowdin_file_name2 = 'files[appstore/appstore_en.txt]'
var local_file_name2 = path.join(__dirname, 'docs/appstore_en.txt')
var local_file2 = fs.createReadStream(local_file_name2)
var crowdin_file_name3 = 'files[appstore/updateinfo_en.txt]'
var local_file_name3 = path.join(__dirname, 'docs/updateinfo_en.txt')
var local_file3 = fs.createReadStream(local_file_name3)
@ -35,16 +32,16 @@ if (crowdin_api_key != '') {
};
bhttp.post('https://api.crowdin.com/api/project/' + crowdin_identifier + '/update-file?key=' + crowdin_api_key, payload, {}, function(err, response) {
console.log("Response from hosting service:", response.body.toString());
console.log('Response from update file call:', response.body.toString());
// This call will tell the server to generate a new zip file for you based on most recent translations.
https.get('https://api.crowdin.com/api/project/' + crowdin_identifier + '/export?key=' + crowdin_api_key, function(res) {
console.log('Export Got response: ' + res.statusCode);
}).on('error', function(e) {
console.log('Export Got error: ' + e.message);
});
})
// This call will tell the server to generate a new zip file for you based on most recent translations.
https.get('https://api.crowdin.com/api/project/' + crowdin_identifier + '/export?key=' + crowdin_api_key, function(res) {
console.log("Export Got response: " + res.statusCode);
}).on('error', function(e) {
console.log("Export Got error: " + e.message);
});
};
@ -62,8 +59,9 @@ https.get('https://crowdin.com/download/project/' + crowdin_identifier + '.zip',
pos += data[i].length;
};
var zip = new AdmZip(buf);
zip.extractAllTo("./", true);
console.log("Done extracting ZIP file.");
zip.extractAllTo('./', true);
console.log('Done extracting ZIP file.');
});
});

View File

@ -57,9 +57,10 @@
"test": "./node_modules/.bin/grunt test-coveralls"
},
"devDependencies": {
"adm-zip": "git://github.com/cthackers/adm-zip.git",
"adm-zip": "^0.4.7",
"angular": "^1.3.14",
"angular-mocks": "^1.3.14",
"bhttp": "^1.2.1",
"grunt-contrib-compress": "^0.13.0",
"grunt-contrib-copy": "^0.8.0",
"grunt-karma": "^0.10.1",