0

I'm using TypeScript to build by JS files in my project. I also use chutzpah extension to visual studio to run my tests. The issue I'm having is that I have an 3 scripts that needs to be loaded and my test .ts file as the last one. The problem I'm having is that the first scripts needs to be loaded before all other scripts are loaded. Also the first script is an external one (not within my project).

/// <reference path="externalScript" />
/// <chutzpah_reference path="../js/script1.js" />
/// <chutzpah_reference path="../js/script2.js" />
/// <chutzpah_reference path="../app/myProjectFile.ts"/>

How can I load the first script first and then all the other. It looks like an async call should be done - but I didnt't manage to solve it with it.

Ace
  • 831
  • 2
  • 8
  • 28
  • Can you provide a real sample (on github possibly)? Also, make sure you have a chutzpah.json file that describes how you want to compile your .ts code. Otherwise Chutzpah uses its legacy compilation mode (which will be deprecated) which uses an old .ts compiler. https://github.com/mmanela/chutzpah/wiki/Compile-Setting – Matthew Manela Jan 30 '15 at 14:40

1 Answers1

0

Well, I didn't use the json file of Chutzpah - I wasn't aware of it. But I mange to solve the problem by first adding my first script and when it was loaded I just used setTimeout 2 times on my other 2 files.

Ace
  • 831
  • 2
  • 8
  • 28