如何让 Meteor 忽略文件? [英] How to make Meteor ignore files?

查看:23
本文介绍了如何让 Meteor 忽略文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Meteor 文件结构中是否有一些特定的文件夹被 Meteor 忽略?(meteor bundlemeteor deploy 等)

Is there some specific folder in Meteor file structure which is simply ignored by Meteor? (meteor bundle and meteor deploy etc)

或者更好:是否有一种 .meteorignore 文件,我们可以在其中列出 Meteor 忽略的文件?

Or better yet: is there a kind of .meteorignore file where we can list files for Meteor to ignore?

推荐答案

目前还没有 .meteorignore 这样的文件.

There's no such file as .meteorignore yet.

目前在 Meteor 中隐藏文件的唯一可靠方法是将其隐藏(在名称的开头添加一个点).您可以隐藏整个目录,如果您需要为 Grunt 任务等特定文件名,这将非常有用.

Currently the only reliable way to hide a file from Meteor is to make it hidden (add a dot to the beginning of name). You can hide the whole directory, which is useful if you need specific filenames for things like Grunt tasks.

例如,如果你创建了一个名为 .hammerTime 的目录,那么 Meteor 就不能碰这个.

For example if you create a directory called .hammerTime, then Meteor can't touch this.

更新:
从 Meteor v1.5.2.1 开始,支持 .meteorignore 文件.它的工作原理与 .gitignore 完全相同.

Update:
As of Meteor v1.5.2.1, there is support for a .meteorignore file. It works exactly the same as a .gitignore.

这篇关于如何让 Meteor 忽略文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆