Skip to content

Commit

Permalink
Disable unused moduleMain code for browserify compatibility
Browse files Browse the repository at this point in the history
The jison parser generator by default will generate a command-line
interface built into the parser. node-mojangson only uses the parser
object and not the command-line interface, and has no way to access it,
so it can be safely disabled -- since it causes compatibility issues
with some browserify transforms (and is unused), see:

zaach/jison#300
browserify/static-eval#12
  • Loading branch information
deathcap committed Jan 10, 2016
1 parent cc77e29 commit b81190e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions jison_generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var fs = require('fs');
var path = require('path');

var options = {
mainModule: function() {}
};

var grammar = fs.readFileSync(path.join(__dirname, 'grammar.jison'), 'utf8');
Expand Down

0 comments on commit b81190e

Please sign in to comment.