Commit graph

37 commits

Author SHA1 Message Date
MiroslavDionisiev
3985f403da refactor: moved buffer plugin to shared config 2024-07-26 11:59:41 +03:00
MiroslavDionisiev
cf8c433a50 refactor: [UEPR-17] Removed usage of Terser plugin in webpack config, depend on minimize flag 2024-07-16 10:11:00 +03:00
MiroslavDionisiev
991269bb52 refactor: [UEPR-17] Removed splitting code to chunks and restored used by tests html files 2024-06-26 17:03:57 +03:00
MiroslavDionisiev
96d99e446b build: [UEPR-17] Migrated webpack to version 5 2024-06-13 11:25:45 +03:00
adroitwhiz
6c8b5bc2a9 Fix webpack glob 2019-04-23 13:21:40 -04:00
adroitwhiz
3e710e66ec Move playground style rules into stylesheet 2019-03-24 03:03:51 -04:00
Christopher Willis-Ford
fba2d90fda Stub queryPlayground.html 2019-01-25 17:28:51 -08:00
Christopher Willis-Ford
31db3d8596 Build playground using Webpack 2019-01-25 17:28:02 -08:00
Michael "Z" Goddard
9b869e0da7 Depend on script dependencies for downstream webpack
Downstream webpack will need any dependencies src/ depends on so it can
successfully build. Also if multiple packages being built into a larger
script share a common dependency version range, they can share the
dependency instead of duplicating it. This will save built file size,
execution time, and memory.
2018-05-31 16:49:21 -04:00
Michael "Z" Goddard
6b393ecc39 Replace babel-preset-es2015 with babel-preset-env 2018-05-08 16:46:06 -04:00
Michael "Z" Goddard
041de9e157
Update to webpack 4
- Remove unused base64-loader
2018-05-07 12:18:39 -04:00
Christopher Willis-Ford
e958e4bfff Fix playground, plus misc. cleanup
The playground was trying to build with a now-missing entry point.
Also, I fixed some JSDoc comments, added HTML labels, etc. until IDEA
had no meaningful complaints about `playground/index.html`.
2018-01-10 17:42:38 -08:00
Christopher Willis-Ford
63fc1c6f64 Update packaging to use UMD and the browser field
The web build is now packaged as UMD, and the `browser` field in
`package.json` now points to the web build output.
2018-01-10 12:58:10 -08:00
Paul Kaplan
067eb1940d 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 10:04:57 -05:00
Christopher Willis-Ford
c3445971fd Fix ify-loader test on Windows / Cygwin
On Windows and Cygwin the path to JS source files may contain
backslashes, forward slashes, or a mix. The regex used to test whether
or not to use `ify-loader` contains path separators; this change allows
either slash instead of requiring only forward slashes.
2017-11-15 17:20:54 -08:00
Paul Kaplan
ebe2db2e02 Add utils for text wrapping, originally by CWF 2017-10-10 09:06:38 -04:00
Christopher Willis-Ford
e5f6af5320 Standardize repository settings
Add missing file type to `.gitattributes`.
Use `node` instead of deprecated `stable` version specifier for Travis.
Set dev tool to `cheap-module-source-map`.
2017-04-11 11:38:16 -04:00
Christopher Willis-Ford
7068b201fb Fix dev server port number 2017-03-08 16:16:20 -08:00
Christopher Willis-Ford
10db85594f Generate /playground from /src/playground
The playground now must be loaded with a URL that ends in "/playground/"
or "/playground/index.html"; loading at "/" will no longer work.

The /playground folder is now purely an output of the build process,
rather than being a mix of build output and static content. The static
content that was previously there (namely, index.html) has been moved
into /src/playground. The `contentBase` has been set to `false` to avoid
confusion between current, in-memory build output and stale, on-disk
build output.
2017-03-08 14:48:57 -08:00
Christopher Willis-Ford
7db54d9066 Explicitly specify raw-loader for shader files
This helps standardize our Webpack config
2017-03-08 14:23:28 -08:00
Christopher Willis-Ford
805ec54f57 chore: adapt code for Webpack 2 2017-02-03 11:01:29 -08:00
Christopher Willis-Ford
f5af954acb Webpack config cleanup, fix dev server
This change tweaks the expression of paths in the Webpack config to make
`webpack-dev-server` work again. This opened the door for some minor
cleanup of `path` & `filename` in the `output` configuration entries.
Thanks to @rschamp for help resolving the `webpack-dev-server` problems.
2017-01-10 14:55:07 -08:00
Christopher Willis-Ford
c2ca8d2a84 Add source maps to Webpack config 2017-01-10 14:39:47 -08:00
Christopher Willis-Ford
47b46fb1aa Update Webpack config like scratch-storage
- Move build outputs into `dist/`
- Make build output file names more consistent
- Update `playground/index.html` for new output file name
- Explicitly specify target => Node output is much smaller
- Minor fixes / cleanup in `.gitignore` and `src/index*.js`
2016-12-12 12:06:05 -08:00
Christopher Willis-Ford
85bdbdb721 Windows compat: Tell webpack-dev-server to poll
When running on Windows, Webpack seems to more reliably notice altered
files when running in polling mode. We already use the `--watch-poll`
argument in the `watch` script, but this change adds equivalent settings
to the config used in the `start` script by `webpack-dev-server`.
2016-11-02 10:39:10 -04:00
Ray Schamp
d813dd9191 Lint 2016-09-27 09:42:04 -04:00
Ray Schamp
09dc67fa83 Set playground as dev server content base
For consistency with scratch-vm.
The redirect from index to playground was already unnecessary.
2016-09-26 11:58:26 -04:00
Ray Schamp
9f26ab17eb Publish playground to gh-pages 2016-09-24 15:26:37 -04:00
Ray Schamp
278cddf04e Build module to be imported
If another package wants to import `src/index.js`, it needs to replicate the loader config in `webpack.config.js`. To avoid this, package the module in `dist.js` and set that as the module to require.

I changed `main` to point to this so that other packages can just `require('scratch-blocks')`, but it would also work for our purposes to add `"webpack": "./dist.js"` if we want to keep `src/index.js` as `main`.
2016-09-20 09:13:35 -04:00
Tim Mickel
fb3f677e2c Remove worker support ()
* Remove WebWorker support

* Recompile Sept. 14
2016-09-15 19:01:44 -04:00
Andrew Sliwinski
672947ca56 Normalize build result naming to match VM conventions 2016-08-08 14:22:54 -04:00
Christopher Willis-Ford
543f05d6d4 Use babel-polyfill, plus compatibility fixes 2016-06-16 14:30:32 -07:00
Christopher Willis-Ford
2c9e17d486 Use babel for ES6 / ES2015 support 2016-06-15 14:39:44 -07:00
Christopher Willis-Ford
f3a80c3429 Split 'index' files into 3: node, web, worker 2016-06-15 13:48:02 -07:00
Christopher Willis-Ford
fc10df7e41 Allow driving the renderer from a web worker
The build generates a new output set called `render-webgl-worker`, meant
to be imported from a web worker. This exposes the `RenderWebGLRemote`
class to facilitate communication with the renderer using `postMessage`
and `onmessage`.
Only a few messages are implemented so far, but it's enough to run the
demo page.
2016-06-14 11:45:35 -07:00
Christopher Willis-Ford
60931611d4 Move build products and demo.html into subdir 2016-05-13 11:42:40 -07:00
Christopher Willis-Ford
51e17c57a9 Establish initial structure, create demo.html
So far this does nothing but clear the screen to magenta, but it's a
start.
2016-05-13 11:29:51 -07:00