Defining global variable for Browserify

Writing Spine = require(‘spine’) in each file is the right way to do. Yet, there are several possibilities by using the global or window object (browserify sets the global object to window, which is the global namespace): in spine.js: global.Spine = module.exports in any other .js file bundled by browserify: global.Spine = require(‘spine’) in a … Read more