0

I have a typescript filewatcher set up in webstorm that I want to use to constantly compile changes to the typescript file. The file also uses jQuery. The typescript compiler is not changing the file to javascript as it should. The compilation happen perfectly fine until I added "--module amd" to the arguments - to compile with javascript. So what I have now is the new .ts file and the old .js file as it was before I changed the argument.

Here's the ts file:

/// <reference path="jquery.d.ts" />


function append(parentDivId, text){
    $(idSelector(parentDivId)).append(text);
}

Here are the filewatcher settings are as shown:

Program: C:\Users\Me\AppData\Roaming\npm\tsc.cmd

Arguments: --sourcemap $FileName$ --out "--module amd"

1
  • argument don't look correct - you need to pass a path to generated file as a value of -out option. Like: --module amd -sourcemap $FileName$ --out $ProjectFileDir$/javascript/$FileNameWithoutExtension$.js Commented Dec 3, 2013 at 15:21

1 Answer 1

1

If you want use tsc that comes with node the Program needs to be along the lines of node <pathtotsc.js>

Instead I recommend you use the TypeScript SDK. Demo : http://www.youtube.com/watch?v=RWXGMug_Rmo&hd=1

Sign up to request clarification or add additional context in comments.

2 Comments

I've looked through C:\Users\Me\node_modules\ but I don't see a tsc.js anywhere. Did you mean "tsc.cmd"? Where can I find one?
The problem just disappeared. Thanks anyways.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.