I'm trying to combine browserify and mootools if possible. I load mootools in the head of my page and then I attempt to define a class in a way that Browserify can parse this way in a file called parallax.js
:
module.exports = new Class({
Implements: [Options, Events],
options: {
container: window
},
initialize: function(options) {
console.log('test');
}
});
Then in another file called `app.js' that is the main js file for the app, I require parallax.js like so:
var parallax = require('./parallax.js');
parallax.initialize();
But the call to initalize gives an error:
Uncaught TypeError: undefined is not a function
I suspect I've thought of this all wrong, but I'm unsure how to leverage MooTools alongside the modularity the Browserify permits. Perhaps MooTools and Browserify just don't play well together?