Skip to content

Commit bce16ea

Browse files
committed
updated server packaging
1 parent 1926b1e commit bce16ea

50 files changed

Lines changed: 69 additions & 39 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/server/__test__/player.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Request, Response } from '@prisel/common';
22
import { priselpb } from '@prisel/protos';
3-
import { getWelcome } from '../message';
4-
import { newPlayer } from '../player';
5-
import { emit } from '../utils/networkUtils';
6-
import { mockContext, mockSocket } from '../utils/testUtils';
3+
import { getWelcome } from '../src/message';
4+
import { newPlayer } from '../src/player';
5+
import { emit } from '../src/utils/networkUtils';
6+
import { mockContext, mockSocket } from '../src/utils/testUtils';
77
jest.mock('../utils/networkUtils');
88

99
describe('player', () => {

packages/server/__test__/room.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { newRoom, Room } from '../room';
2-
import { mockContext } from '../utils/testUtils';
3-
import { GAME_PHASE } from '../objects/gamePhase';
4-
import { Context } from '../objects';
1+
import { Context } from '../src/objects';
2+
import { GAME_PHASE } from '../src/objects/gamePhase';
3+
import { newRoom, Room } from '../src/room';
4+
import { mockContext } from '../src/utils/testUtils';
55

66
describe('room', () => {
77
let context: Context;
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
scripts:
2-
default: env DEBUG=debug ts-node --project tsconfig-demo.json demo.ts
2+
default: env DEBUG=debug ts-node --project tsconfig.demo.json src/demo.ts
33
clean: rm -rf ./lib ./dist
4-
ts-check: tsc --project tsconfig-build.json
54
build: rollup --config --silent
5+
build-cjs: tsc --project tsconfig.buildcjs.json
6+
build-esm: tsc --project tsconfig.buildesm.json
7+
build-types: tsc --project tsconfig.buildtypes.json

packages/server/package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@prisel/server",
33
"version": "0.1.3",
4-
"description": "> TODO: description",
4+
"description": "Library to build a multiplayer server.",
55
"homepage": "https://github.com/SeawolvesAtCali/prisel/tree/master/packages/server#readme",
66
"bugs": {
77
"url": "https://github.com/SeawolvesAtCali/prisel/issues"
@@ -12,22 +12,23 @@
1212
},
1313
"license": "MIT",
1414
"author": "Yiou Chen <chen.yiou1992@gmail.com>",
15-
"main": "./lib/index.cjs.js",
16-
"module": "./lib/index.esm.js",
17-
"browser": "./lib/index.umd.js",
18-
"types": "./lib/index.d.ts",
15+
"main": "./dist/cjs/index.js",
16+
"module": "./dist/esm/index.js",
17+
"types": "./dist/types/index.d.ts",
18+
"exports": {
19+
"import": "./dist/esm/index.js",
20+
"require": "./dist/cjs/index.js"
21+
},
1922
"directories": {
2023
"lib": "./",
2124
"test": "__test__"
2225
},
2326
"files": [
24-
"lib"
27+
"dist"
2528
],
2629
"scripts": {
27-
"build": "nps clean ts-check build",
30+
"build": "nps clean build-types build-cjs build-esm",
2831
"docgen": "typedoc index.ts",
29-
"fix": "tslint --project tsconfig.json --fix",
30-
"lint": "tslint --project tsconfig.json",
3132
"start": "nps",
3233
"test": "jest"
3334
},
@@ -43,14 +44,12 @@
4344
"ws": "^8.4.0"
4445
},
4546
"devDependencies": {
46-
"@prisel/configs": "1.0.0",
4747
"@types/debug": "^4.1.7",
4848
"@types/koa": "^2.13.4",
4949
"@types/lodash": "^4.14.178",
5050
"@types/node": "^17.0.4",
5151
"@types/ws": "^8.2.2",
5252
"nps": "^5.10.0",
53-
"rollup": "^2.62.0",
5453
"tslib": "^2.3.1",
5554
"typedoc": "^0.22.10",
5655
"typedoc-plugin-markdown": "^3.11.8",

packages/server/rollup.config.js

Lines changed: 0 additions & 10 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)