Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling TypeScript source code

Tags:

typescript

How can I configure my Windows environment to build/deploy TypeScript source code using Makefile script?

What do I need?

EDIT

I Have a clone of TypeScript repository in my pc. Now I want know how to run the Makefile script to deploy the TypeScript compiler. I Want to compile my own source code of TypeScript compiler. What utilities do I need for this?

like image 591
Diullei Avatar asked Aug 16 '26 07:08

Diullei


2 Answers

On plain windows setup u can run tsc.js through windows script host (WSH) as well.

Actually... file management without node.js is done through WSH. You can check it out yourself. It is in the sources under compiler in io.ts.

To build compiler yourself... all u need to do is just pass plain "src/tsc.ts" to compiler and setup some output dir such as "bin2"... if you wanna use relative paths remember about setting your current directory.

Here is an example of how it works... I have done it this way.

  1. Run cmd
  2. Go to "YOURS_TYPESCRIPT/src/compiler/" directory
  3. Write:

    tsc --out ../../bin/tsc2.js tsc.ts

  4. Now you are a fine mother of another typescript compiler. :)

Edit: You have so many options on windows by default that it is even funny you ask for another one for makefiles. :P

You could use batch(*.bat) files or WSH with JScript([ecma scripting again] *.js ) or Visual Basic(that one I didn't use). Why make someone into installing another one if those got all u need?

like image 146
Arek Bal Avatar answered Aug 17 '26 22:08

Arek Bal


You'll need to have the command-line TypeScript Compiler installed on your machine. You can get this for node.js (npm install -g typescript) if you're running that locally.

tsc helloworld.ts

You should be able to patch that into your build process at this point.

like image 41
Sampson Avatar answered Aug 17 '26 23:08

Sampson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!