Skip to content

Commit 6eaf631

Browse files
committed
Include library JSON files in package distribution
Files like src/lib/libraries/sprites.json were being used by packages like scratch-desktop in order to fetch all the library assets for offline access. We stopped publishing src in scratchfoundation#5263 to stop bloating the dist with copies of src files. Explicitly exporting the files that are needed by other repos is a better long-term plan. The files are now published to dist/libraries/*.json. Once this is merged those repos that use the src/ path need to change it to e.g. `require('scratch-gui/dist/libraries/backdrops.json')`
1 parent 19c9db0 commit 6eaf631

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

webpack.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,12 @@ module.exports = [
219219
new CopyWebpackPlugin([{
220220
from: 'extension-worker.{js,js.map}',
221221
context: 'node_modules/scratch-vm/dist/web'
222+
}]),
223+
// Include library JSON files for scratch-desktop to use for downloading
224+
new CopyWebpackPlugin([{
225+
from: 'src/lib/libraries/*.json',
226+
to: 'libraries',
227+
flatten: true
222228
}])
223229
])
224230
})) : []

0 commit comments

Comments
 (0)