Commit eaf24aba authored by Terence Martin's avatar Terence Martin

Split Engine and Game into separate JS files

Phase one of this is now complete; there are two tsconfig.json files
to compile each part to its own output file and both are included
in the HTML file.

I'm currently not doing anything with external build systems of any
kind (maybe next?) so the .d.ts file falls out inside the JS output
directory because the TypeScript compiler puts both in the same place
no matter what.

As a result, this means that the tsconfig file for the game has to
reference the file in that location, which is a little bit of a drag,
but oh well.

In theory if one was to have the engine be its own project, this
would be taken care of by not having the compiler generate those
files anyway.
parent e7036a8f
......@@ -101,6 +101,7 @@
<script src="bootstrap/assets/js/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="bootstrap/assets/js/ie10-viewport-bug-workaround.js"></script>
<script src="js/nurdzGameEngine.js"></script>
<script src="js/engine.js"></script>
<script src="js/game.js"></script>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"noImplicitAny": false,
"declaration": true,
"sourceMap": false,
"outFile": "../../js/engine.js"
},
"files": [
"nurdz.ts",
"GameEngine.ts",
"Preloader.ts",
"Utils.ts",
"Point.ts",
"Actor.ts",
"Entity.ts",
"Scene.ts",
"Renderer.ts",
"CanvasRenderer.ts",
"Stage.ts",
"SceneManager.ts",
"Tile.ts",
"Tileset.ts",
"LevelData.ts",
"Level.ts",
"Sound.ts"
]
}
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"noImplicitAny": false,
"declaration": false,
"sourceMap": false,
"outFile": "../../js/game.js"
},
"files": [
"../../js/engine.d.ts",
"main.ts"
]
}
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"noImplicitAny": false,
"outDir": "../js",
"declaration": false,
"sourceMap": false,
"outFile": "../js/nurdzGameEngine.js"
},
"files": [
"engine/nurdz.ts",
"engine/GameEngine.ts",
"engine/Preloader.ts",
"engine/Utils.ts",
"engine/Point.ts",
"engine/Actor.ts",
"engine/Entity.ts",
"engine/Scene.ts",
"engine/Renderer.ts",
"engine/CanvasRenderer.ts",
"engine/Stage.ts",
"engine/SceneManager.ts",
"engine/Tile.ts",
"engine/Tileset.ts",
"engine/LevelData.ts",
"engine/Level.ts",
"engine/Sound.ts",
"game/main.ts"
]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment