mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2025-06-08 19:14:26 -04:00
Fix static assets path
This commit is contained in:
parent
914f883c65
commit
071ba28fc8
4 changed files with 5 additions and 7 deletions
scripts
|
@ -9,6 +9,7 @@ const libraries = require('./lib/libraries');
|
|||
|
||||
const ASSET_HOST = 'cdn.assets.scratch.mit.edu';
|
||||
const NUM_SIMULTANEOUS_DOWNLOADS = 5;
|
||||
const OUT_PATH = path.resolve('static', 'assets');
|
||||
|
||||
|
||||
const describe = function (object) {
|
||||
|
@ -72,7 +73,7 @@ const fetchAsset = function (md5, callback) {
|
|||
return;
|
||||
}
|
||||
|
||||
const stream = fs.createWriteStream(path.resolve('src', 'static', 'assets', md5), {encoding: 'binary'});
|
||||
const stream = fs.createWriteStream(path.resolve(OUT_PATH, md5), {encoding: 'binary'});
|
||||
stream.on('error', callback);
|
||||
response.on('data', chunk => {
|
||||
stream.write(chunk);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue