diff --git a/gulp/util/bundle.js b/gulp/util/bundle.js index 3e4d4e8..b635f70 100644 --- a/gulp/util/bundle.js +++ b/gulp/util/bundle.js @@ -39,6 +39,7 @@ function createBundler(args) { args = args || {}; args.debug = true; + args.standalone = 'PIXI'; var bundle = browserify(paths.jsEntry, args), argv = require('minimist')(process.argv.slice(2)), @@ -48,8 +49,6 @@ bundle.ignore(require.resolve('../../src/' + exclude[i])); } - bundle.require(paths.jsEntry, { expose: 'pixi.js' }); - return bundle; } diff --git a/gulp/util/bundle.js b/gulp/util/bundle.js index 3e4d4e8..b635f70 100644 --- a/gulp/util/bundle.js +++ b/gulp/util/bundle.js @@ -39,6 +39,7 @@ function createBundler(args) { args = args || {}; args.debug = true; + args.standalone = 'PIXI'; var bundle = browserify(paths.jsEntry, args), argv = require('minimist')(process.argv.slice(2)), @@ -48,8 +49,6 @@ bundle.ignore(require.resolve('../../src/' + exclude[i])); } - bundle.require(paths.jsEntry, { expose: 'pixi.js' }); - return bundle; } diff --git a/src/index.js b/src/index.js index 8f51010..8288c0c 100644 --- a/src/index.js +++ b/src/index.js @@ -17,13 +17,5 @@ // mixin the deprecation features. Object.assign(core, require('./deprecation')); -// export to global +// Always export pixi globally. global.PIXI = core; - -// export for AMD if necessary -if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(function () { - return core; - }); -}