diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..04c01ba --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +dist/ \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..1dde532 --- /dev/null +++ b/.npmignore @@ -0,0 +1,3 @@ +src/ +tests/ +node_modules/ diff --git a/integration.test.js b/integration.test.js new file mode 100644 index 0000000..65c5518 --- /dev/null +++ b/integration.test.js @@ -0,0 +1,11 @@ +const { myContainer } = require('./dist/injection.config'); +const gameController = myContainer.get('GameController'); + +const newState = gameController.gameTurn(); + +if(newState.general.turn !== 1) { + console.log('Turn does not match!'); + console.log(newState); +} else { + console.log('Integration is fine!'); +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..93e63bf --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "@greegko/rpg-village", + "version": "1.0.0", + "private": true, + "scripts": { + "test:watch:integration": "tsc-watch --onSuccess 'node ./integration.test.js'", + "build": "npm run build:clear && npm run build:src", + "build:src": "tsc", + "build:clear": "rm -dR ./dist" + }, + "dependencies": { + "@greegko/rpg-model": "0.*", + "inversify": "4.11.1", + "ramda": "^0.24.1", + "shortid": "2.2.8", + "reflect-metadata": "0.1.12" + }, + "devDependencies": { + "@types/ramda": "^0.24.13", + "tsc-watch": "^1.0.17", + "typescript": "2.8.1" + }, + "types": "dist/index.d.ts", + "main": "dist/index.js" +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..a7273fc --- /dev/null +++ b/src/index.ts @@ -0,0 +1 @@ +import { } from '@greegko/rpg-model'; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..6fb39dc --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "removeComments": false, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "noUnusedLocals": true, + "noImplicitAny": false, + "declaration": true, + "outDir": "dist/", + "lib": [ + "es2015" + ] + }, + "exclude": [ + "node_modules", + "dist" + ] + } + \ No newline at end of file