有没有更好地组织(模块化) Meteor项目的技术/指南?
谢谢。
发布于 2013-04-02 01:05:47
Meteor非常灵活,你可以通过meteorite使用自己的子包,就像蒂埃里说的那样。我最喜欢的方式就是把我的功能和<template>内部的东西分成多个html文件和js文件。每个视图/模板一个,例如
client/
home.html (contains my html data in a <template name="home"> and any subtemplates
home.js (contains my helpers & event handlers for home)
server
server_methods.js (methods)
server_publish.js (publish functions)对于更通用的东西,比如(router.js -用于流星路由器),我让它们自己站起来。它非常方便的meteor只是在没有告诉它的情况下收集所有这些内容,并将它们发送到客户端。
发布于 2013-04-01 22:04:08
我自己还没有尝试过,但我计划在我的主项目中尝试将陨石包作为git/mercurial子模块。
https://stackoverflow.com/questions/15744664
复制相似问题