【发布时间】:2016-01-20 14:33:41
【问题描述】:
我正在尝试使用 AngularJS 和 Grunt 在 Typescript 上进行 POC。我没有找到很多清楚解释该过程的文档。
我看到当我在_all.ts 中添加所有打字稿引用时,它就可以工作了。但我需要了解原因。谁解析_all.ts 使其工作?
文件夹结构
anggen
-.tmp
-app
-blocks
-common
-images
...
-styles
-404.html
-_all.ts
-app.ts
-favicon.ico
-index.html
-bower_components
-node_modules
-test
-typings
-.bowerrc
-.editorconfig
-.gitattributes
-.gitignore
-.jscsrc
-.jshintrc
-.travis.yml
-.yo-rc.json
-bower.json
-Gruntfile.js
-package.json
-README.md
-tsd.json
-tslint.json
【问题讨论】:
-
您能分享一下您的应用程序的结构吗?通常有一个正确定义的tsconfig.json就足够了,你有这样的文件吗?
-
这可能是问题的一部分。还要检查@basarat 的答案。可能是您采用了一种较旧的方式来创建打字稿项目。 :)
-
是否有任何链接指向使用 tsconfig.json 的新方式?
-
另外,在文件夹中运行 tsc --init 应该会创建一个默认配置。 :)
标签: angularjs gruntjs typescript