Commit graph

61 commits

Author SHA1 Message Date
Christopher Willis-Ford
c3759e8e99 fix: music extension sounds were not loading correctly 2024-09-07 01:01:14 -07:00
MiroslavDionisiev
0ecc26f992 refactor: moved buffer plugin to shared config 2024-07-26 11:39:47 +03:00
MiroslavDionisiev
4f146d6290 fix: [UEPR-27] Added missing entry point 2024-07-04 10:14:48 +03:00
MiroslavDionisiev
93f41d8cb0 refactor: [UEPR-17] Changed library name 2024-06-26 16:50:39 +03:00
MiroslavDionisiev
21a8bd6982 build: [UEPR-17] Cnanged resolve to use path defined in scratch-render exports 2024-06-13 16:37:01 +03:00
Christopher Willis-Ford
e7962b101d fix(build): simplify webpack config using clone() 2024-03-08 20:10:00 -08:00
Christopher Willis-Ford
9261909f90 fix(build)!: use scratch-webpack-configuration
BREAKING CHANGE: changes compatibility, especially for the web build
2024-03-08 19:53:17 -08:00
Christopher Willis-Ford
b8371aded1 fix(build): polyfill Buffer internally 2024-03-04 14:21:57 -08:00
Christopher Willis-Ford
0f3a847689 build!: tell webpack to output UMD in all cases
BREAKING CHANGE: this could affect compatibility with library consumers
2024-03-04 11:41:28 -08:00
Christopher Willis-Ford
64d17098a1 fix(build): misc webpack 5 build fixes 2024-03-04 11:10:29 -08:00
Christopher Willis-Ford
89f83f7434 chore(deps): update dependency webpack-cli to v4.x
for webpack 5 compatibility
2024-02-28 11:26:08 -08:00
Christopher Willis-Ford
c97b47679e chore(deps): upgrade dependency expose-loader to v1.x
for webpack 5 compatibility
2024-02-28 10:12:12 -08:00
(quasar) nebula
fba9e33235
fix(deps): use terser-webpack-plugin instead of uglifyjs-webpack-plugin 2024-01-05 13:57:03 -04:00
adroitwhiz
1aa38db4e6 replace nets with Fetch API 2021-02-19 10:56:33 -05:00
Christopher Willis-Ford
a308b1e02f use xmlEscape instead of escape-html for extensions 2019-04-17 16:48:58 -07:00
Michael "Z" Goddard
d8ae96a58c
build playground/benchmark.js 2019-01-24 17:48:17 -05:00
Ray Schamp
fd0ff04198 Update babel-core to @babel/core
Also required updating @babel/preset-env.
2018-10-17 12:14:49 +01:00
Michael "Z" Goddard
a15a9a1b7b Fix benchmark suite (#1397)
* add scratch-svg-renderer adaptors to benchmark vm

* disable benchmark with monitor error

* fixup! add scratch-svg-renderer adaptors to benchmark vm

* fixup! disable benchmark with monitor error
2018-08-08 14:36:38 -04:00
Ray Schamp
bfa229535a
Merge pull request #1188 from mzgoddard/resolve-webpack-playground
fix: resolve scratch-*/src/index.js for expose-loader
2018-06-01 16:28:11 -04:00
Michael "Z" Goddard
fda288506a
fix: resolve scratch-*/src/index.js for expose-loader
require.resolve is a nodejs api that resolves as node resolves. An
enhanced-resolve instance, the library webpack uses, could resolve as
webpack will or we can use some slightly more manual definitions here
for exposing parts of scratch on the global object for the playground's
benchmark to use.
2018-06-01 13:38:18 -04:00
Ray Schamp
6fb8d86880 Remove unused script-loader for highlightjs 2018-05-31 16:54:30 -04:00
Michael "Z" Goddard
4ceeebb257 Use src/index as browser entry point
Use src/index.js as the entry by default in tools building scratch-vm
into a larger package. This saves file space by excluding extra webpack
boilerplate and may allow for deeper optimizations.

Depend on script dependencies for downstream webpack. For another
package to build in scratch-vm's dependencies without them already
being built into a consumed webpack build they need to be listed as
dependencies. This can benefit large projects that reuse the same
dependencies multiple times. Node will still use the main entry point
and its webpack build leaves the dependencies as external references so
it may reuse common modules in Node as well as in a build a browser
environment.
2018-05-31 16:32:46 -04:00
Ray Schamp
a9a23ef589
Merge pull request #1104 from mzgoddard/webpack-4
Update to webpack 4
2018-05-07 11:28:51 -04:00
Michael "Z" Goddard
dcb6a3ac56
Update babel-preset-es2015 to babel-preset-env
Use the common scratch browserlist configuration used for styling and babel
transforming in other scratch repositories.
2018-05-04 15:49:12 -04:00
Michael "Z" Goddard
f60d8fc4c1
Update to webpack 4 2018-05-03 18:57:48 -04:00
Michael "Z" Goddard
d4bffcbddb
Rename playground/motion.html to video-sensing.html 2018-04-03 16:19:52 -04:00
Michael "Z" Goddard
c206dc3241
Add motion playground page for debugging video sensing 2018-03-29 19:02:07 -04:00
Eric Rosenbaum
5d5129d753 Don’t copy assets via webpack 2018-02-14 17:55:11 -05:00
Eric Rosenbaum
063ac39019 Load music extension assets with require 2018-02-14 17:53:05 -05:00
Christopher Willis-Ford
3717394f00 Playground: load renderer as UMD
The recent changes to the renderer's build output packaging broke this
repository's playground / benchmark suite. These changes aren't the only
way to fix the issue, but this is consistent with the way that the
storage module was already being loaded.
2018-01-29 14:04:19 -08:00
Ray Schamp
e8fd5b1f13 Replace playground with benchmark 2017-12-12 12:17:33 -05:00
Ray Schamp
921ce24195 Merge branch 'benchmark-prototype' of https://github.com/mzgoddard/scratch-vm into mzgoddard-benchmark-prototype
# Conflicts:
#	.gitignore
2017-12-12 09:48:52 -05:00
Christopher Willis-Ford
88dada5cb8 Use UMD for web ouput
UMD output seems to be working well for the storage module; this change
adjusts the web-targeted build outputs of this module to use it as well.
Also, common output properties are now specified in the base config and
removed from each individual config.
2017-11-27 20:07:31 -08:00
Michael "Z" Goddard
7356546072
Add benchmark prototype
Build a page with webpack that loads a project and automatically runs
it, collecting performance information for a set amount of time,
stopping and displaying the results.
2017-11-20 18:40:55 -05:00
Eric Rosenbaum
614708d48c
Merge pull request #785 from ericrosenbaum/feature/load-drums-from-storage
Load drum sounds from storage and play them
2017-11-20 13:56:23 -05:00
Paul Kaplan
26771e9e0c Only uglify if building for production.
Uglify was trying to run always, including the dev-server output, which
included es6 that broke uglifier.
2017-11-17 09:59:09 -05:00
Eric Rosenbaum
f5b25a190e Add assets (drum sounds) for music extension 2017-11-13 16:23:10 -05:00
Chris Willis-Ford
d8a3e659d5 Playground: use UMD to load storage as global (#722)
* Playground: use UMD to load storage as global

It appears that `expose-loader` is not compatible with WebPack's UMD
exporter, so the VM playground broke when I converted `scratch-storage`
to use UMD. This change causes the playground to load `scratch-storage`
as an independent script and relies on its UMD loader to expose it as a
global. Bonus points: we get better source mapping this way.

* Playground: tell eslint about global ScratchStorage
2017-10-17 17:40:11 -04:00
Ray Schamp
bafdf8d9f2 Use ES6 linting rules in the project root
Update all tests for `no-var` and `prefer-arrow-callback` (using `--fix`)
2017-04-24 15:37:58 -04:00
Ray Schamp
e96807b399 Merge branch 'develop' of https://github.com/LLK/scratch-vm into es6
# Conflicts:
#	src/import/sb2import.js
#	src/virtual-machine.js
#	webpack.config.js
2017-04-19 17:54:31 -04:00
Ray Schamp
9be29439b1 Fix webpack for ES6 2017-04-17 19:55:34 -04:00
Christopher Willis-Ford
0402b7ed8e Standardize repository settings
Set dev tool to `cheap-module-source-map`.
2017-04-11 11:38:58 -04:00
Christopher Willis-Ford
c23e9c6bf8 Load projects & costumes through scratch-storage
This also sets up the framework to load sounds through scratch-storage,
to be finished in a later change.
2017-03-09 11:25:55 -08:00
Christopher Willis-Ford
243d68f88b Use Webpack to generate the whole playground
The previous configuration mixed Webpack output with static content in
order to create the playground. This change moves that static content
from `/playground/` into `/src/playground/` and adds a Webpack rule to
copy it into the playground as part of the build.

On the surface this might seem unnecessary, but it provides at least two
benefits:
- It's no longer possible to accidentally load stale build output
  through `webpack-dev-server` in the event of a misconfiguration. This
  was very easy in the previous configuration, and might in fact be the
  only way that `webpack-dev-server` ever worked for this repository.
- It's simpler to ensure that various rules apply to the hand-authored
  content and not build outputs. This includes lint rules, `.gitignore`,
  IDE symbol search paths, etc.
2017-02-10 14:21:37 -08:00
Ray Schamp
a6568c4bf2 Update webpack config for webpack 2
* `module.loaders` -> `module.rules`
* loaders need `-loader` suffix
* `json-loader` is enabled by default
* `UglifyJsPlugin`'s `compress.warning` setting is false by default
2017-02-01 16:27:55 -05:00
Chris Willis-Ford
9b04392211 Move build outputs into a dist/ subdirectory (#375)
* Move Node output: /dist.js => /dist/node/scratch-vm.js
* Move web output: /vm{.js,.min.js} => /dist/web/scratch-vm{.js,.min.js}
* Update build output references in package.json and the playground's index.html
* Move the VirtualMachine class out of index.js into its own file, referenced by index.js. The VirtualMachine class is otherwise unchanged.
* Add .gitattributes rules for new file types which were added to this repository without specifying their text/binary attributes
* Turn on source maps in webpack and add corresponding .gitignore rule
2017-01-13 13:34:26 -08:00
Eric Rosenbaum
fec9e5b91a add audio to playground 2017-01-06 11:49:25 -05:00
Ray Schamp
9859c3d91a Merge pull request #335 from rschamp/feature/port
Fix dev port number
2016-11-21 14:32:44 -05:00
Ray Schamp
5b36e3cacd Fix dev port number
scratch-www: 8333
scratch-api: 8491
scratch-gui: 8601

Clearly the port should be 8073 for scratch-vm.
2016-11-21 14:25:08 -05:00
Tim Mickel
16c405d559
Remove assets copy plugin 2016-10-31 10:41:16 -04:00