Make sure you've installed node.js and Grunt
Run npm install in this directory (the source root). This should install the
required node.js modules. You might want to npm install -g coffee-script http-server also.
Clone my fork of Emscripten and checkout
the pcejs branch. Add it to your $PATH so you can run emcc. Similarly you
should be working with my fork of PCE on the
pcejs branch, but that's where you're reading this, right?
Most of the build process involves running Grunt tasks. Run grunt --help for a
list of possiblities.
Make sure you've got a directory containing a working set of files for the emulator. This means: a rom file, a config file, and some media (hard disk and/or floppy images). You can use a normal build of PCE test these out eg. one obtained from the website, or your package manager of choice (in my case, homebrew).
Your config file should be named pce-config.cfg. Once you've got these together
in a directory, run grunt romdir:[your directory] which will symlink the
directory into the source tree at roms/. This is necessary for when the data
files are packaged up for the browser.
Run grunt build:[target] to build the emulator, where [target] is macplus,
ibmpc or atarist.
You'll find the built files at pce-js/ and grunt run will serve them up for
your browser on http://localhost:8080/. That's it.