@ion-phaser/react
Advanced tools
Comparing version
@@ -1,2 +0,28 @@ | ||
export * from './components'; | ||
//# sourceMappingURL=index.js.map | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var loader = require('@ion-phaser/core/loader'); | ||
var React = _interopDefault(require('react')); | ||
class IonPhaser extends React.Component { | ||
constructor() { | ||
super(...arguments); | ||
this.ref = React.createRef(); | ||
} | ||
componentWillReceiveProps(nextProps) { | ||
const node = this.ref.current; | ||
if (node.game !== nextProps.game) { | ||
node.game = nextProps.game; | ||
} | ||
} | ||
render() { | ||
return (React.createElement("ion-phaser", Object.assign({ ref: this.ref }, this.props))); | ||
} | ||
} | ||
loader.defineCustomElements(window); | ||
exports.IonPhaser = IonPhaser; |
{ | ||
"name": "@ion-phaser/react", | ||
"version": "1.1.0", | ||
"description": "React specific wrapper for ion-phaser", | ||
"version": "1.1.1", | ||
"description": "React specific wrapper for @ion-phaser/core", | ||
"keywords": [ | ||
@@ -11,5 +11,9 @@ "ionic", | ||
"webcomponent", | ||
"mobile", | ||
"app", | ||
"webapp", | ||
"web component", | ||
"web components" | ||
"web components", | ||
"progressive web app", | ||
"pwa" | ||
], | ||
@@ -23,8 +27,9 @@ "license": "MIT", | ||
"build": "npm run clean && npm run compile", | ||
"clean": "rm -rf dist", | ||
"compile": "npm run tsc", | ||
"tsc": "tsc -p ." | ||
"clean": "rm -rf dist && rm -rf dist-transpiled", | ||
"compile": "npm run tsc && rollup -c", | ||
"tsc": "tsc -p .", | ||
"test": "jest" | ||
}, | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.js", | ||
"module": "./dist/index.esm.js", | ||
"types": "./dist/index.d.ts", | ||
@@ -35,10 +40,16 @@ "files": [ | ||
"dependencies": { | ||
"@ion-phaser/core": "1.1.0" | ||
"@ion-phaser/core": "^1.1.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "16.7.6", | ||
"typescript": "^3.2.2" | ||
"react": "^16.9.0", | ||
"phaser": "^3.19.0", | ||
"@types/react": "^16.9.1", | ||
"typescript": "^3.5.3", | ||
"rollup": "^1.19.4", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-sourcemaps": "^0.4.2" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.7.0" | ||
"react": "^16.9.0", | ||
"phaser": "^3.19.0" | ||
}, | ||
@@ -49,5 +60,6 @@ "jest": { | ||
"node_modules", | ||
"dist" | ||
"dist", | ||
"dist-transpiled" | ||
] | ||
} | ||
} |
5091
0.39%62
44.19%3
50%7
250%7
-36.36%+ Added
+ Added
- Removed
Updated