mirror of
https://github.com/demostf/demo.js
synced 2026-06-03 16:44:12 +02:00
add seperate build with es6 modules
This commit is contained in:
parent
417006e089
commit
42fdddb4b0
4 changed files with 34 additions and 1 deletions
1
Makefile
1
Makefile
|
|
@ -13,6 +13,7 @@ watch: node_modules
|
|||
.PHONY: build
|
||||
build: node_modules
|
||||
node $(tsc)
|
||||
node $(tsc) -p tsconfig.es6.json
|
||||
|
||||
.PHONY: test
|
||||
test: node_modules
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
"bin": {
|
||||
"demo-analyse": "./bin/analyse.js"
|
||||
},
|
||||
"main": "demo.js",
|
||||
"main": "build/index.js",
|
||||
"jsnext:main": "build/es6/index.js",
|
||||
"module": "build/es6/index.js",
|
||||
"dependencies": {
|
||||
"bit-buffer": "icewind1991/bit-buffer#typings",
|
||||
"clone": "^2.1.0",
|
||||
|
|
|
|||
13
src/index.ts
Normal file
13
src/index.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
export {Demo} from './Demo';
|
||||
export {Parser} from './Parser';
|
||||
export {StreamParser} from './StreamParser';
|
||||
export {Match} from './Data/Match';
|
||||
export {Player} from './Data/Player';
|
||||
export {PlayerCondition} from './Data/PlayerCondition';
|
||||
export {GameEvent} from './Data/GameEvent';
|
||||
export {PacketEntity} from './Data/PacketEntity';
|
||||
export {SendPropDefinition, SendPropFlag, SendPropType} from './Data/SendPropDefinition';
|
||||
export {SendProp} from './Data/SendProp';
|
||||
export {Vector} from './Data/Vector';
|
||||
export {World} from './Data/World';
|
||||
export {UserInfo} from './Data/UserInfo';
|
||||
17
tsconfig.es6.json
Normal file
17
tsconfig.es6.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2015.promise",
|
||||
"es5"
|
||||
],
|
||||
"module": "ES6",
|
||||
"target": "ES5",
|
||||
"outDir": "build/es6",
|
||||
"rootDir": "src",
|
||||
"declaration": true,
|
||||
"strictNullChecks": true,
|
||||
"sourceMap": true,
|
||||
"moduleResolution": "node"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue