最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Both folder vs lib folder meteor - Stack Overflow

programmeradmin3浏览0评论

As I understand it in meteor you can have a both folder along with a lib folder. Both folders hold code that are pertinent to both the client and the server, such as iron-router routes or meteor collection definitions. Is there a difference between the two folders or are they the exact same thing?

As I understand it in meteor you can have a both folder along with a lib folder. Both folders hold code that are pertinent to both the client and the server, such as iron-router routes or meteor collection definitions. Is there a difference between the two folders or are they the exact same thing?

Share Improve this question asked Aug 4, 2014 at 13:40 NateNate 1,87515 silver badges28 bronze badges 1
  • 1 both appears to just be a random name, if you name a folder aoth, its contents will load before both. so it would go lib then aoth then both. lib is a thing, but both is not a thing. – Alexander Mills Commented Feb 4, 2015 at 1:17
Add a ment  | 

1 Answer 1

Reset to default 11

Both code would act as the same thing, just the lib folder would have a preference with regard to loading order.

Files in the lib directory would be loaded first, before the ones in the both directory. This can be useful for helpers and constants and stuff you need to be ready before anything else loads.

发布评论

评论列表(0)

  1. 暂无评论