TypeStrong / grunt-ts

A grunt task to manage your complete typescript development to production workflow
https://www.npmjs.com/package/grunt-ts
MIT License
330 stars 122 forks source link

Updating to v5.4.0 led to a change in the order in which the files are concatenated #347

Open thorn0 opened 8 years ago

thorn0 commented 8 years ago

In my project, tsconfig.json with the outFile option is used. With v5.3.2, the files in the project root went first in the output file, which was exactly what is needed. But after the update, the order has changed. The files seem to be sorted by their name now, regardless their location. My project was broken, and I had to stick with 5.3.2.

So, is this an intended change?

How can I enforce the order so that the files from the root would always be first even if I switch to a newer version of grunt-ts?

Actually, in this case (when tsconfig.json exists), I think grunt-ts shouldn't have any influence on the concatenation order at all. If I run tsc directly from the command line, I get the same results as with 5.3.2.

nycdotnet commented 8 years ago

Hi, we did change that code but this was not one of the intended results. I also think grunt-ts should respect the order used by tsc.

thorn0 commented 8 years ago

Related issue: https://github.com/Microsoft/TypeScript/issues/8776 ('File enumeration order in directory-scanning mode should be deterministic')