Make .map files for debugging using the original typescript source. Try it using your browsers developer tools.
10 |Countdown to insanity:
11 |To stop the insanity or the countdown, type countdown_helper.stop() into the js console.
12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/basic_browser_project/src/main2.ts: -------------------------------------------------------------------------------- 1 | 2 | // this is another source file 3 | // there are no references to this file from other files mentioned in tsconfig.json[files] 4 | // -> so this file has to be mentioned in tsconfig.json[files] to be compiled 5 | 6 | // in contrast: insanity.ts is compiled automatically, because it is referenced in main.ts 7 | // but it would be no harm, if insanity.ts would also be mentioned in tsconfig.json 8 | 9 | // just make sure, you will use something like document.ready(function() {}) as 10 | // an entry point for your code, if you have a larger codebase 11 | 12 | (This is an example for a typescript project in a browser, using 13 | require.js and amd modules.
14 | 15 |execute
npm installto install all dependencies 16 | 17 |
A test system is included.
18 | 19 |You must compile the sources and execute the gruntfile. This will copy the files from the
res/folder to the
built/folder, from where you can open
index.htmland
test.htmlafterwards. 20 | 21 |
If you open this file from the
res/folder, it will not work 22 |