Merge pull request #51 from CharlotteGore/commonjs

PIXI now wrapped in an anonymous function, with exports for CommonJS.
This commit is contained in:
Mat Groves 2013-05-04 03:19:26 -07:00
commit d9ab4ec80c
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',
@ -33,7 +34,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);