Commit graph

17 commits

Author SHA1 Message Date
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