@robotlegsjs/createjs
Version:
CreateJS View Integration with RobotlegsJS
115 lines • 8.77 kB
JSON
{
"name": "@robotlegsjs/createjs",
"version": "3.1.0",
"description": "CreateJS View Integration with RobotlegsJS",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"repository": {
"url": "https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/createjs"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"keywords": [
"TypeScript",
"Robotlegs",
"IoC",
"CreateJS"
],
"author": "RobotlegsJS",
"contributors": [
"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/createjs#readme",
"files": [
"lib"
],
"directories": {
"lib": "./lib"
},
"dependencies": {
"@robotlegsjs/core": "^3.1.0",
"tslib": "^2.3.0"
},
"peerDependencies": {
"easeljs": "^1.0.2",
"reflect-metadata": "^0.1.13"
},
"devDependencies": {
"@jsdevtools/coverage-istanbul-loader": "^3.0.5",
"@mcler/webpack-concat-plugin": "^4.1.3",
"@rushstack/eslint-config": "^2.3.4",
"@types/bluebird": "^3.5.36",
"@types/chai": "^4.2.21",
"@types/createjs-lib": "^0.0.29",
"@types/easeljs": "^1.0.1",
"@types/mocha": "^8.2.3",
"@types/sinon": "^10.0.2",
"@types/tweenjs": "^1.0.4",
"@types/webpack-env": "^1.16.2",
"bluebird": "^3.7.2",
"chai": "^4.3.4",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^9.0.1",
"easeljs": "^1.0.2",
"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",
"html-webpack-plugin": "^5.3.2",
"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",
"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",
"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": {
"start": "webpack serve --config ./webpack.example.config.js",
"test": "node --max-old-space-size=2048 ./node_modules/karma/bin/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:example": "eslint -c .eslintrc.js --ext .ts ./example --fix",
"lint-fix": "npm run lint-fix:src && npm run lint-fix:test && npm run lint-fix:example",
"lint:src": "eslint -c .eslintrc.js --ext .ts ./src",
"lint:test": "eslint -c .eslintrc.js --ext .ts ./test",
"lint:example": "eslint -c .eslintrc.js --ext .ts ./example",
"lint": "npm run lint:src && npm run lint:test && npm run lint:example",
"cleanup": "rimraf .nyc_output && rimraf coverage && rimraf lib && rimraf lib-test && rimraf lib-example && rimraf dist && rimraf dist-test",
"compile:src": "tsc",
"compile:test": "tsc -p tsconfig.test.json",
"compile:example": "tsc -p tsconfig.example.json",
"dist:dev": "webpack",
"dist:production": "webpack --env production",
"build:example": "webpack --config ./webpack.example.config.js --env.production",
"deploy:example": "./deploy-example.sh",
"build": "npm run cleanup && npm run compile:src"
},
"readme": "# RobotlegsJS CreateJS Extension\n\n[](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/createjs/LICENSE)\n[](https://gitter.im/RobotlegsJS/RobotlegsJS)\n[](https://badge.fury.io/js/%40robotlegsjs%2Fcreatejs)\n[](https://github.com/prettier/prettier)\n\nIntegrate [RobotlegsJS](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/core)\nframework with [CreateJS](https://createjs.com).\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/createjs --save\n```\n\nOr using [Yarn](https://yarnpkg.com/en/):\n\n```bash\nyarn add @robotlegsjs/createjs\n```\n\nThe [EaselJS](https://github.com/CreateJS/EaselJS) dependency is added as **peerDependencies**,\nallowing the final user to choose the desired version of the [easeljs](https://www.npmjs.com/package/easeljs) library on each project.\n\nThe `@robotlegsjs/createjs` package is compatible with versions between the `>=1.0.2 <2` version range of `easeljs` library.\n\nAs example, when you would like to use the version `1.0.2` of `easeljs` library, you can run:\n\n```bash\nnpm install easeljs@1.0.2 reflect-metadata --save\n```\n\nor\n\n```bash\nyarn add easeljs@1.0.2 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+ [tslib](https://github.com/Microsoft/tslib)\n\n**Peer Dependencies**\n\n+ [EaselJS](https://github.com/CreateJS/EaselJS)\n+ [reflect-metadata](https://github.com/rbuckton/reflect-metadata)\n\n## Usage\n\n```typescript\nimport { Context, MVCSBundle } from \"@robotlegsjs/core\";\n\nimport { ContextView, CreateJSBundle } from \"@robotlegsjs/createjs\";\n\nimport { MyConfig } from \"./config/MyConfig\";\n\nimport { RobotlegsView } from \"./view/RobotlegsView\";\n\nexport class Game {\n\n private _canvas: HTMLCanvasElement;\n private _stage: createjs.Stage;\n\n private _context: Context;\n\n constructor () {\n this.init();\n }\n\n private init(): void {\n this._canvas = <HTMLCanvasElement>(document.getElementById(\"canvas\"));\n this._stage = new createjs.Stage(this._canvas);\n\n this._context = new Context();\n this._context.install(MVCSBundle, CreateJSBundle).\n configure(new ContextView(this._stage)).\n configure(MyConfig).\n initialize();\n\n // enable touch interactions if supported on the current device:\n createjs.Touch.enable(this._stage);\n\n // enabled mouse over / out events\n this._stage.enableMouseOver(10);\n this._stage.mouseMoveOutside = true; // keep tracking the mouse even when it leaves the canvas\n\n let robotlegs: RobotlegsView = new RobotlegsView();\n\n robotlegs.x = this._canvas.width / 2;\n robotlegs.y = this._canvas.height / 2;\n\n this._stage.addChild(robotlegs);\n\n window.addEventListener(\"resize\", this.handleResize.bind(this));\n createjs.Ticker.addEventListener(\"tick\", this.tick.bind(this));\n }\n\n private handleResize(): void {\n this._stage.update();\n }\n\n private tick(event: Object): void {\n this._stage.update(event);\n }\n}\n```\n\n[See full example here](example/index.ts)\n\n## Running the example\n\nRun the following commands to run the example:\n\n```bash\nnpm install\nnpm start\n```\n\nor:\n\n```bash\nyarn install\nyarn start\n```\n\n## RobotlegsJS CreateJS for enterprise\n\nAvailable as part of the Tidelift Subscription\n\nThe maintainers of [@robotlegsjs/createjs](https://github.com/RobotlegsJS/RobotlegsJS-Framework/tree/master/packages/createjs) 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-createjs?utm_source=npm-robotlegsjs-createjs&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)\n\n## License\n\n[MIT](LICENSE)\n"
}