mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
40 lines
2.6 KiB
JavaScript
40 lines
2.6 KiB
JavaScript
// If we've updated pixi or p2 then their UMD wrappers will be wrong, this will fix it:
|
|
module.exports = {
|
|
pixi: {
|
|
src: ['src/pixi/Outro.js'],
|
|
dest: 'src/pixi/Outro.js',
|
|
replacements: [{
|
|
from: "define(PIXI);",
|
|
to: "define('PIXI', (function() { return root.PIXI = PIXI; })() );"
|
|
}]
|
|
},
|
|
|
|
p2: {
|
|
src: ['src/physics/p2/p2.js'],
|
|
dest: 'src/physics/p2/p2.js',
|
|
replacements: [{
|
|
from: '!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.p2=e():"undefined"!=typeof global?global.p2=e():"undefined"!=typeof self&&(self.p2=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module \'"+o+"\'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){',
|
|
to: '!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(\'p2\', (function() { return this.p2 = e(); })()):"undefined"!=typeof window?window.p2=e():"undefined"!=typeof global?self.p2=e():"undefined"!=typeof self&&(self.p2=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module \'"+o+"\'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){'
|
|
}]
|
|
},
|
|
|
|
docs: {
|
|
src: ['docs/index.html'],
|
|
dest: 'docs/index.html',
|
|
replacements: [
|
|
{
|
|
from: /(<p><img src="http:\/\/www\.phaser\.io\/images\/phaser2)[\s\S]*(<li><a href="#license">License<\/a><\/li>\s<\/ul>)/g,
|
|
to: ''
|
|
},
|
|
{
|
|
from: /(<!--<h1 class="page-title">Index<\/h1>-->)[\s\S]*(<\/section>\s*<\/div>\s*<div class="clearfix"><\/div>\s*<footer>)/g,
|
|
to: '</article></div><div class="clearfix"></div><footer>'
|
|
},
|
|
{
|
|
from: /(<p><).*(><\/p>)/g,
|
|
to: ''
|
|
}
|
|
]
|
|
}
|
|
|
|
};
|