PIXI now wrapped in an anonymous function, with exports for CommonJS.

This commit is contained in:
Charlotte Gore 2013-04-05 22:34:24 +01:00
parent 3740c3d30e
commit 953e8fe261
3 changed files with 25 additions and 1 deletions

View file

@ -9,6 +9,7 @@ module.exports = function(grunt) {
var root = 'src/pixi/',
debug = 'bin/pixi.dev.js',
srcFiles = [
'<%= dirs.src %>/Intro.js',
'<%= dirs.src %>/Pixi.js',
'<%= dirs.src %>/Point.js',
'<%= dirs.src %>/Rectangle.js',
@ -31,7 +32,8 @@ module.exports = function(grunt) {
'<%= dirs.src %>/textures/BaseTexture.js',
'<%= dirs.src %>/textures/Texture.js',
'<%= dirs.src %>/loaders/SpriteSheetLoader.js',
'<%= dirs.src %>/loaders/AssetLoader.js'
'<%= dirs.src %>/loaders/AssetLoader.js',
'<%= dirs.src %>/Outro.js',
], banner = [
'/**',
' * @license',

7
src/pixi/Intro.js Normal file
View file

@ -0,0 +1,7 @@
/**
* @author Mat Groves http://matgroves.com/ @Doormat23
*/
(function(){
var root = this;

15
src/pixi/Outro.js Normal file
View file

@ -0,0 +1,15 @@
/**
* @author Mat Groves http://matgroves.com/ @Doormat23
*/
if (typeof exports !== 'undefined') {
if (typeof module !== 'undefined' && module.exports) {
exports = module.exports = PIXI;
}
exports.PIXI = PIXI;
} else {
root.PIXI = PIXI;
}
}).call(this);