Add a new API method `precompileShifterModule()` that, given a shifter module directory, precompiles the template modules and writes them to JavaScript files in the `js` directory.