typescript output order - gulp equivalent to tsc with tsconfig.json

醉酒当歌 提交于 2019-12-05 14:14:12

my problem is that I can't find a gulp way to generate the same javascript as tsc does

TypeScript has an internal implementation of ordering that does it by:

  • Order of files passed in the command line. If you are tsconfig this is not relevant.
  • Order in which the files are detected. Since you are using tsconfig it will start at the first file and then order the others by references and import directives.

Note: This is not available to API consumers (like gulp). Also this can lead to issues even with just tsc : https://github.com/TypeStrong/atom-typescript/blob/master/docs/out.md

So use external modules : https://basarat.gitbooks.io/typescript/content/docs/project/modules.html

And here is a quickstart : https://basarat.gitbooks.io/typescript/content/docs/quick/browser.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!