diff --git a/.gitignore b/.gitignore index 636cdc8..513ef03 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ node_modules/ thumbs.db # don't store the assets downloaded with the `fetch` script -/src/static/assets/ +/static/assets/ # generated translation files /translations diff --git a/scripts/fetchMediaLibraryAssets.js b/scripts/fetchMediaLibraryAssets.js index 9e04998..bea5aca 100644 --- a/scripts/fetchMediaLibraryAssets.js +++ b/scripts/fetchMediaLibraryAssets.js @@ -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); diff --git a/src/.eslintrc.js b/src/.eslintrc.js index 15523ec..9e9dd67 100644 --- a/src/.eslintrc.js +++ b/src/.eslintrc.js @@ -3,5 +3,6 @@ module.exports = { env: { node: true }, - extends: ['scratch', 'scratch/es6'] + extends: ['scratch', 'scratch/es6'], + globals: ['__static'] }; diff --git a/webpack.renderer.additions.js b/webpack.renderer.additions.js index c8f2ad8..b3002f2 100644 --- a/webpack.renderer.additions.js +++ b/webpack.renderer.additions.js @@ -62,10 +62,6 @@ module.exports = { { from: path.resolve(__dirname, 'node_modules', 'scratch-gui', 'dist', 'static'), to: 'static' - }, - { - from: path.resolve(__dirname, 'src', 'static'), - to: 'static' } ]) ],