mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 05:12:35 +01:00
ac9e718ef1
refs #37
22 lines
811 B
JavaScript
22 lines
811 B
JavaScript
var https = require('https');
|
|
var fs = require('fs');
|
|
|
|
var PATH = 'dist/mempool/assets/';
|
|
if (process.argv[2] && process.argv[2] === 'dev') {
|
|
PATH = 'src/assets/';
|
|
}
|
|
|
|
function download(filename, url) {
|
|
var file = fs.createWriteStream(filename);
|
|
https.get(url, function(response) {
|
|
response.pipe(file);
|
|
});
|
|
}
|
|
|
|
console.log('Downloading assets');
|
|
download(PATH + 'assets.json', 'https://raw.githubusercontent.com/Blockstream/asset_registry_db/master/index.json');
|
|
console.log('Downloading assets minimal');
|
|
download(PATH + 'assets.minimal.json', 'https://raw.githubusercontent.com/Blockstream/asset_registry_db/master/index.minimal.json');
|
|
console.log('Downloading asset icons');
|
|
download(PATH + 'asset.icons.json', 'https://raw.githubusercontent.com/Blockstream/asset_registry_db/master/icons.json');
|