Skip to content
Snippets Groups Projects
Commit 6eaf6312 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

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 #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')`
parent 19c9db0e
No related branches found
No related tags found
No related merge requests found
...@@ -219,6 +219,12 @@ module.exports = [ ...@@ -219,6 +219,12 @@ module.exports = [
new CopyWebpackPlugin([{ new CopyWebpackPlugin([{
from: 'extension-worker.{js,js.map}', from: 'extension-worker.{js,js.map}',
context: 'node_modules/scratch-vm/dist/web' context: 'node_modules/scratch-vm/dist/web'
}]),
// Include library JSON files for scratch-desktop to use for downloading
new CopyWebpackPlugin([{
from: 'src/lib/libraries/*.json',
to: 'libraries',
flatten: true
}]) }])
]) ])
})) : [] })) : []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment