我是TypeScript的新手,现在我通过我的项目结构在几个地方都有.ts文件:
app/
|-scripts/
|-app.ts
|
|-classes/
| |-classA.ts
| |-classB.ts
|
|-controllers/
| |-controllerA.ts
| |-controllerB.ts
|
|-otherStuff/
|-otherstuffA.ts
Run Code Online (Sandbox Code Playgroud)
现在,当我的文件被编译时,它们被编译到.ts文件所在的同一目录:
app/
|-scripts/
|-app.ts
|-app.js
|
|-classes/
| |-classA.ts
| |-classB.ts
| |-classA.js
| |-classB.js
|
|-controllers/
| |-controllerA.ts
| |-controllerB.ts
| |-controllerA.js
| |-controllerB.js
|
|-otherStuff/
|-otherstuffA.ts
|-otherStuffA.js
Run Code Online (Sandbox Code Playgroud)
虽然我喜欢.js文件与.ts文件保持相同目录结构的方式,但我不想跟踪我的VCS中的.js文件,因此我想将所有JavaScript文件保存在单独的目录树(我可以添加到.gitignore),如下所示:
app/
|-scripts/
| |-app.ts
| |
| |-classes/
| | |-classA.ts
| | |-classB.ts
| |
| |-controllers/
| | |-controllerA.ts
| | |-controllerB.ts
| |
| |-otherStuff/
| |-otherstuffA.ts
| …Run Code Online (Sandbox Code Playgroud) 如果我记得在Jasmine中有一个命令会将我正在运行的Jasmine的确切版本记录到控制台,但我不记得它是什么.我很肯定我在某个地方见过这个,现在我真的需要它,我无法在任何地方找到它.有谁知道它是什么?
编辑:已发布的使用解决方案jasmine.getEnv().versionString()无法正常工作 - 对于读取此问题的任何mod,将更好地解决该问题作为一个新问题开始,还是继续在这里?
jasmine ×1
javascript ×1
phantomjs ×1
tsc ×1
typescript ×1
unit-testing ×1
version ×1
versioning ×1
webstorm ×1