Search the Community
Showing results for tags 'compile'.
-
I'm compiling my TypeScript project into a single JS file, at the moment by specifying an outFile in the compiler options. In my project each class is defined in a different file. The problem is that classes that depend on each other are not concatenated in the output JS in the right order. For example, if I have class A that extends class B, it'd mean class B would have to be compiled before class A. (1) class A extends B { } //error - can't find B class B { } (2) class B { } class A extends B { } //works as expected The problem is the file order in TypeScript compile is not defined according to class dependencies, resulting in many instances of (1). It can be solved by manually defining the compile order with many lines of: /// <reference path="myFile.ts"/> however it is not ideal and can quickly become a headache in large projects. The other option from what I read is to use external modules and be able to require/import relevant classes/files. It sounds good, but it seems to only take care of ASYNC loading during runtime of the required files after each ts file has been compiled into its own js file. What I need is defining the right compile order according to class dependencies during compile time from ts to js. I googled "typescript compile order" and read thoroughly the first 10 results - meaning following references to turoials, documentations, videos, etc... It seems people have been experiencing the same problem but their questions have never been answered to satisfaction. From what I understand it should be possible to do using the CommonJS external module, but all I can understand from the answers is a general sense of what should be happening rather than a simple and straightforward answer of how to actually do it. If you know the answer, let's solve this issue once and for all
-
Is it possible to develop in Java but compile it to javascript with pixi js? Say i develop in Java and bind it so that when I compile it compiles to javascript with pixi js, in a way I want. How to do it?
-
Hi all, I'm having a few issues with Phaser 2.0, typescript and physics and hope that someone can point me in the right direction. Not sure if my error is because the phaser.d.ts might be incomplete or I'm just missing something. I'm simply trying to init Arcade physics by calling... this.game.physics.startSystem(Phaser.Physics.ARCADE);This compile error I receive is... The property 'startSystem' does not exist on value of type 'Phaser.Physics.Arcade.World'.If I try and use.. new Phaser.Physics.Arcade(this.game);... I don't get the compile error. Pretty much any other calls to a sprite's body or other physics functions cause an error too. Thanks for the help. -- Mark
- 4 replies
-
- physics
- typescript
-
(and 2 more)
Tagged with: