【问题标题】:Prevent Meteor from including files?防止 Meteor 包含文件?
【发布时间】:2014-03-08 01:59:53
【问题描述】:

我知道 Meteor 不包含 tests/ 目录或 .* 目录中的文件。我希望它也不包含 cron/node_modules/ 目录中的文件。

【问题讨论】:

  • 不能包含的目录之一是 node_modules(cron 任务使用节点库),我不能在其中添加 .,所以我正在寻找更多通用配置选项。
  • 您能否将您的cron/node_modules/ 目录移动到父目录中?

标签: meteor


【解决方案1】:

目前没有这样的配置选项。加载哪些文件夹由 Meteor 源中的these lines 决定:

    // Read top-level subdirectories. Ignore subdirectories that have
    // special handling.
    var sourceDirectories = readAndWatchDirectory('', {
      include: [/\/$/],
      exclude: [/^packages\/$/, /^programs\/$/, /^tests\/$/,
                /^public\/$/, /^private\/$/,
                otherSliceRegExp].concat(sourceExclude)
    });

要跳过其他文件夹,您必须分叉 Meteor 并调整这些行。

【讨论】:

  • 注意:otherSliceRegExp 不包括 clientserver 目录。
猜你喜欢
  • 1970-01-01
  • 2012-07-15
  • 2010-09-29
  • 2012-02-01
  • 1970-01-01
  • 2023-03-12
  • 2012-06-08
相关资源
最近更新 更多