ember-cli如何让西兰花忽略某些文件的变化

时间:2014-10-21 18:40:28

标签: vim ember.js ember-cli

我正在使用ember-cli v0.0.47,我希望能够在触发构建时让brocolli忽略某些文件的更改。

我正在使用vim作为创作工具,我将其配置为在编辑器失去焦点时保存所有打开的文件(这包括交换和撤消文件)。这会导致我的ember-cli项目进行大量不必要的重建,这是因为brocolli检测到文件已被更改并继续重建。

因此,我希望能够以某种方式告诉brocolli在某些文件被更改时不要触发项目的重建。有没有办法实现这个目标?

1 个答案:

答案 0 :(得分:5)

我不知道从Broccoli中排除文件的方法,但通常这确实是一个问题,并且有助于将vim的临时文件写入别处以防止频繁重建,所以在.vimrc

set backupdir=~/.vim/backup//
set directory=~/.vim/swp//

您还必须手动创建目录。

需要额外的斜杠,因此它会保留该目录中的文件结构。来自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.
相关问题