diff --git a/gulp/util/bundle.js b/gulp/util/bundle.js index 7c5de51..c42b1e7 100644 --- a/gulp/util/bundle.js +++ b/gulp/util/bundle.js @@ -39,7 +39,6 @@ function createBundler(args) { args = args || {}; args.debug = true; - args.standalone = 'PIXI'; var bundle = browserify(paths.jsEntry, args), argv = require('minimist')(process.argv.slice(2)), diff --git a/gulp/util/bundle.js b/gulp/util/bundle.js index 7c5de51..c42b1e7 100644 --- a/gulp/util/bundle.js +++ b/gulp/util/bundle.js @@ -39,7 +39,6 @@ function createBundler(args) { args = args || {}; args.debug = true; - args.standalone = 'PIXI'; var bundle = browserify(paths.jsEntry, args), argv = require('minimist')(process.argv.slice(2)), diff --git a/src/index.js b/src/index.js index a6e9ca7..0c4b3d9 100644 --- a/src/index.js +++ b/src/index.js @@ -17,3 +17,14 @@ // mixin the deprecation features. Object.assign(core, require('./deprecation')); + +// export to global +global.PIXI = core; + +// export for AMD if necessary +if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(function () { + return core; + }); +}