[英]Naming pattern for TypeScript compiled Javascript files
We recently created a Repository for a TypeScript project. 我们最近为TypeScript项目创建了一个存储库。 We try to
.ignore
all generated files to keep our repository and build processes clean. 我们尝试
.ignore
所有生成的文件,以保持我们的存储库和构建过程的清洁。
Currently our TypeScript files someFile.ts
are compiled to JavaScript files someFile.js
. 当前,我们的TypeScript文件
someFile.ts
被编译为JavaScript文件someFile.js
。 We would like to ignore all compiled files. 我们想忽略所有编译文件。 However, there are javascript files which we would like to track in our repository.
但是,我们希望在我们的存储库中跟踪javascript文件。 This makes it impossible to simply ignore all
src/**/*.js
files. 这使得不可能简单地忽略所有
src/**/*.js
文件。
Is there a way to add a prefix or postfix or other naming adjustment to the compiled javascript files as a compileOption? 有没有办法将前缀或后缀或其他命名调整作为compileOption添加到已编译的javascript文件? Something like
file.compiled.js
? 像
file.compiled.js
一样?
From the docs: http://www.typescriptlang.org/docs/handbook/compiler-options.html 从文档中: http : //www.typescriptlang.org/docs/handbook/compiler-options.html
You could use --listEmittedFiles
and save the list of compiled files to .gitignore 您可以使用
--listEmittedFiles
并将已编译文件的列表保存到.gitignore
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.