@robotlegsjs/pixi-signalmediator
Version:
TypeScript port of Robotlegs Extension SignalMediator
108 lines • 9.08 kB
JSON
{
"name": "@robotlegsjs/pixi-signalmediator",
"version": "4.0.0",
"description": "TypeScript port of Robotlegs Extension SignalMediator",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"repository": {
"url": "https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/pixi-signalmediator"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"keywords": [
"TypeScript",
"Robotlegs",
"IoC",
"Pixi"
],
"author": "RobotlegsJS",
"contributors": [
"Do Duc Cuong <cuongdd2@gmail.com>",
"Pedro Antonio Souza Viegas <pedroasv@gmail.com>",
"Tiago Schenkel <tiago.schenkel@gmail.com>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/RobotlegsJS/RobotlegsJS-Framework/issues"
},
"homepage": "https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/pixi-signalmediator#readme",
"files": [
"lib"
],
"directories": {
"lib": "./lib"
},
"dependencies": {
"@robotlegsjs/core": "^3.1.0",
"@robotlegsjs/pixi": "^4.0.0",
"@robotlegsjs/signals": "^2.1.0",
"tslib": "^2.3.0"
},
"peerDependencies": {
"pixi.js": "^6.0.0",
"reflect-metadata": "^0.1.13"
},
"devDependencies": {
"@jsdevtools/coverage-istanbul-loader": "^3.0.5",
"@robotlegsjs/eventemitter3": "^3.1.0",
"@rushstack/eslint-config": "^2.3.4",
"@types/bluebird": "^3.5.36",
"@types/chai": "^4.2.21",
"@types/mocha": "^8.2.3",
"@types/sinon": "^10.0.2",
"@types/webpack-env": "^1.16.2",
"bluebird": "^3.7.2",
"chai": "^4.3.4",
"es6-map": "^0.1.5",
"es6-symbol": "^3.1.3",
"eslint": "^7.30.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsdoc": "^35.4.3",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-unicorn": "^34.0.1",
"karma": "^6.3.4",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sinon-chai": "^2.0.2",
"karma-sourcemap-loader": "^0.3.8",
"karma-sourcemap-writer": "^0.1.2",
"karma-webpack": "^5.0.0",
"mocha": "^9.0.2",
"pixi.js": "^6.3.2",
"prettier": "^2.6.2",
"puppeteer": "^10.1.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"sinon": "^11.1.1",
"sinon-chai": "^3.7.0",
"source-map-support": "^0.5.19",
"terser-webpack-plugin": "^5.1.4",
"ts-loader": "^9.2.3",
"ts-node": "^10.1.0",
"typescript": "~4.2.4",
"webpack": "^5.44.0",
"webpack-cli": "^4.7.2",
"webpack-dev-server": "^3.11.2"
},
"scripts": {
"test": "karma start --single-run",
"autoformat": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write --list-different .",
"lint-fix:src": "eslint -c .eslintrc.js --ext .ts ./src --fix",
"lint-fix:test": "eslint -c .eslintrc.js --ext .ts ./test --fix",
"lint-fix": "npm run lint-fix:src && npm run lint-fix:test",
"lint:src": "eslint -c .eslintrc.js --ext .ts ./src",
"lint:test": "eslint -c .eslintrc.js --ext .ts ./test",
"lint": "npm run lint:src && npm run lint:test",
"cleanup": "rimraf .nyc_output && rimraf coverage && rimraf lib && rimraf lib-test && rimraf dist && rimraf dist-test",
"compile:src": "tsc",
"compile:test": "tsc -p tsconfig.test.json",
"dist:dev": "webpack",
"dist:production": "webpack --env production",
"build": "npm run cleanup && npm run compile:src"
},
"readme": "# RobotlegsJS Pixi SignalMediator Extension\n\n[](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/pixi-signalmediator/LICENSE)\n[](https://gitter.im/RobotlegsJS/RobotlegsJS)\n[](https://badge.fury.io/js/%40robotlegsjs%2Fpixi-signalmediator)\n[](https://github.com/prettier/prettier)\n\nA port of [Robotlegs SignalMediator Extension](https://github.com/MrDodson/robotlegs-extensions-SignalMediator) to TypeScript.\n\nOriginally published on [RobotlegsJS-SignalMediator](https://github.com/cuongdd2/RobotlegsJS-SignalMediator).\n\n## Installation\n\nYou can get the latest release and the type definitions using [NPM](https://www.npmjs.com/):\n\n```bash\nnpm install @robotlegsjs/pixi-signalmediator --save\n```\n\nOr using [Yarn](https://yarnpkg.com/en/):\n\n```bash\nyarn add @robotlegsjs/pixi-signalmediator\n```\n\nFrom version `0.2.0` of this package, the [PixiJS](https://github.com/pixijs/pixi.js) dependencies were moved to **peerDependencies**,\nallowing the final user to choose the desired version of the `pixi.js` library on each project.\n\n#### For `pixi.js` version 6\n\nThe `@robotlegsjs/pixi-signalmediator` package version `^4.0.0` is compatible with versions `>=6.0.0 <7` version range of `pixi.js` library.\n\nYou can setup your project for version 6 of `pixi.js` using:\n\n```bash\nnpm install @robotlegsjs/pixi-signalmediator@^4.0.0 pixi.js@^6.0.0 --save\n```\n\nor\n\n```bash\nyarn add @robotlegsjs/pixi-signalmediator@^4.0.0 pixi.js@^6.0.0\n```\n\n#### For `pixi.js` version 5\n\nThe `@robotlegsjs/pixi-signalmediator` package versions `^2.0.0` and `^3.0.0` are compatible with versions `>=5.0.0 <6` version range of `pixi.js` library.\n\nSince version `5.0.0` of `pixi.js`, the `eventemitter3` library was removed and is not necessary anymore.\n\nYou can setup your project for version 5 of `pixi.js` using:\n\n```bash\nnpm install @robotlegsjs/pixi-signalmediator@^3.0.0 pixi.js@^5.0.0 reflect-metadata --save\n```\n\nor\n\n```bash\nyarn add @robotlegsjs/pixi-signalmediator@^3.0.0 pixi.js@^5.0.0 reflect-metadata\n```\n\n#### For `pixi.js` version 4\n\nThe `@robotlegsjs/pixi-signalmediator` package version `^1.0.0` is compatible with versions between the `>=4.2.1 <5` version range of `pixi.js` library.\n\nSince each version of `pixi.js` library defines which version of `eventemitter3` library is being used, remember to also install the proper version of `eventemitter3` in your project.\n\nAs example, when you would like to use the version `4.2.1` of `pixi.js` library, you can run:\n\n```bash\nnpm install @robotlegsjs/pixi-signalmediator@^1.0.0 pixi.js@4.2.1 eventemitter3@^2.0.0 reflect-metadata --save\n```\n\nor\n\n```bash\nyarn add @robotlegsjs/pixi-signalmediator@^1.0.0 pixi.js@4.2.1 eventemitter3@^2.0.0 reflect-metadata\n```\n\nThen follow the [installation instructions](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/core#installation) of **RobotlegsJS** library to complete the setup of your project.\n\n**Dependencies**\n\n+ [RobotlegsJS](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/core)\n+ [RobotlegsJS-Pixi](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/pixi)\n+ [SignalsJS](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/signals)\n+ [tslib](https://github.com/Microsoft/tslib)\n\n**Peer Dependencies**\n\n+ [PixiJS](https://github.com/pixijs/pixi.js)\n+ [reflect-metadata](https://github.com/rbuckton/reflect-metadata)\n\n## Usage\n\n```typescript\nimport { inject, injectable } from \"@robotlegsjs/core\";\n\nimport { SignalMediator } from \"@robotlegsjs/pixi-signalmediator\";\n\n@injectable()\nexport class MyUserMediator extends SignalMediator<MyUserView> {\n\n @inject(UserLoggedInSignal) protected userLoggedInSignal: UserLoggedInSignal;\n @inject(UserLoggedOutSignal) protected userLoggedOutSignal: UserLoggedOutSignal;\n\n constructor() {\n super();\n }\n\n private onUserLoggedIn(): void {\n // user is logged in, do something...\n }\n\n private onUserLoggedOut(): void {\n // user is logged out, do something...\n }\n\n public initialize(): void {\n this.addToSignal(this.userLoggedInSignal, this.onUserLoggedIn.bind(this));\n this.addToSignal(this.userLoggedOutSignal, this.onUserLoggedOut.bind(this));\n }\n\n public destroy(): void {\n // clean up memory...\n }\n}\n```\n\n## RobotlegsJS Pixi SignalMediator for enterprise\n\nAvailable as part of the Tidelift Subscription\n\nThe maintainers of [@robotlegsjs/pixi-signalmediator](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/pixi-signalmediator) and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-robotlegsjs-pixi-signalmediator?utm_source=npm-robotlegsjs-pixi-signalmediator&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)\n\n## License\n\n[MIT](LICENSE)\n"
}