mumoshu / play2-typescript

TypeScript assets handling for Play 2.0. Compiles .ts files under the /assets dir along with the project.
Other
74 stars 14 forks source link

AMD and sub-directories #14

Closed mrkswrnr closed 11 years ago

mrkswrnr commented 11 years ago

Environment:

Description: When using directories to structure typescript imports, the following leads to an error:

javascripts/test.ts

import controllers = module("controllers/UserController");
var obj = new controllers.UserController();

javascripts/controllers/UserController.ts

import components = module("components/Controller");
export class UserController extends components.Controller {

}

javascripts/components/Controller.ts exists

Console output:

Running: [cmd, /C, tsc, --module, amd, --out, %Temp%\1368293356931-1, %ProjectDir%\app\assets\javascripts\test.ts]
Running: [cmd, /C, tsc, --module, amd, --out, %Temp%\1368293357756-1, %ProjectDir%\app\assets\javascripts\components\Controller.ts]
java.io.FileNotFoundException: %Temp%\1368293357756-1\Controller.js

* Path to tempdir replaced with %Temp%

The plugin seems to search for Controller.js under tsc output-root, it was created under %Temp%\1368293357756-1\components\Controller.js though.

Thanks for the plugin :-)

mumoshu commented 11 years ago

Thanks for reporting the issue! I have reproduced it and am working to fix.

mumoshu commented 11 years ago

@diabox

Hi! I have fixed the issue in the latest version (0.2-RC5). Would you mind trying it?

Thanks

mrkswrnr commented 11 years ago

Sorry for my late response. Looks like the issue has been fixed. Works for me :-) Thank you!