11 Commits

Author SHA1 Message Date
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
Ray Schamp
3c6511d94e Generate docs from src, publish to gh-pages
Fix any broken JSDoc syntax. Unfortunately there is no way to document tuples like `{[int, int]}` for a `[width, height]` array. We could possibly fix this and make the code more readable with `{width: number, height: number}` instead of tuples.

Remove single `@fileoverview` from Rectangle.js, since it was the only file with one and was weird to have that one module show up on the docs home page.

Add a `docs` script to `package.json`, run it from `npm test`, so invalid docs will cause tests to fail (eventually we may want to start using eslint-plugin-jsdoc to catch these errors with the linter alone).
2017-02-21 14:46:24 -05: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
Ray Schamp
9f26ab17eb Publish playground to gh-pages 2016-09-24 15:26:37 -04:00
Ray Schamp
d91ddf4158 Publish to NPM 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
Andrew Sliwinski
47b5d07497 Update gitignore 2016-08-08 14:23:01 -04: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