[英]ember-cli how to make brocolli ignore certain files' changes
I am using ember-cli v0.0.47 and I would like to be able to make brocolli ignore some files' changes when it triggers a build. 我正在使用ember-cli v0.0.47,我希望能够使brocolli在触发构建时忽略某些文件的更改。
I'm using vim as authoring tool and I have it configured to save all my open files whenever the editor looses focus (this includes swap and undo files). 我使用vim作为创作工具,并且将其配置为在编辑器失去焦点时保存所有打开的文件(包括交换和撤消文件)。 This has the unfortunate side effect of causing a lot of unnecessary rebuilds of my ember-cli project because brocolli detects that the files have been changed and proceeds to rebuild.
不幸的是,这导致副作用,导致我的ember-cli项目进行了许多不必要的重建,因为brocolli检测到文件已更改,然后继续重建。
As such I'd like to be able to somehow tell brocolli not to trigger a rebuild of the project when some files have been changed. 因此,我希望能够以某种方式告诉brocolli在某些文件已更改时不要触发项目的重建。 Is there some way to achieve this?
有什么办法可以做到这一点?
I don't know of a way to exclude files from Broccoli, but generally this is indeed a problem and it helps to write vim's temporary files elsewhere to prevent frequent rebuilds, so in your .vimrc
: 我不知道从花椰菜中排除文件的方法,但是通常这确实是一个问题,它有助于在其他地方写入vim的临时文件以防止频繁重建,因此在
.vimrc
:
set backupdir=~/.vim/backup//
set directory=~/.vim/swp//
You have to create the directories manually as well. 您还必须手动创建目录。
The extra slash is needed so it preserves the file structure within that directory. 需要额外的斜杠,以便将文件结构保留在该目录中。 From
:help directory
in vim: 从vim的:
:help directory
:
- For Unix and Win32, if a directory ends in two path separators "//"
or "\\", the swap file name will be built from the complete path to
the file with all path separators substituted to percent '%' signs.
This will ensure file name uniqueness in the preserve directory.
On Win32, when a separating comma is following, you must use "//",
since "\\" will include the comma in the file name.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.