Tag: meteor

在Meteor应用程序中使用appcache

我在我的Meteor应用程序中启用了appcache ( http://docs.meteor.com/#/full/appcache )。 但服务器控制台说,我的caching资源的总大小是10.2MB。 从文档看,我必须排除一些文件,因为它们太大了 Meteor.AppCache.config({ onlineOnly: [ '/bigimage.jpg', '/largedata.json' ] }); 问题是我不知道哪些文件太大。 我保持我的文件尽可能分裂,并且由于样式表和JavaScript文件被缩小,我不认为他们使用很多资源。 我的应用程序中没有任何图像或其他特殊文件。 这是纯粹的JS和HTML(甚至没有CSS)。 编辑 我试着检查chrome://appcache-internals/从中我得到以下的细节 http://localhost:3000/ Manifest: http://localhost:3000/app.manifest Size: 10.3 MB Creation Time: Thu Oct 22 2015 08:51:07 GMT+0200 (Romance Daylight Time) Last Access Time: Thu Oct 22 2015 10:16:37 GMT+0200 (Romance Daylight Time) Last Update Time: Thu Oct 22 2015 […]

search源阻止从Meteor 1.1更新到Meteor 1.2之后运行应用程序

当我尝试更新我的Meteor应用程序从1.1到1.2和所有相关的软件包到他们的最新更新,我遇到了一个问题,导致我的应用程序无法启动。 从我看到的,它涉及包search源 我在控制台上看到的错误是这样的: W20151024-13:16:43.165(2)? (STDERR) /Users/emindurak/.meteor/packages/meteor-tool/.1.1.9.3zwwyi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245 W20151024-13:16:43.165(2)? (STDERR) throw(ex); W20151024-13:16:43.165(2)? (STDERR) ^ W20151024-13:16:43.165(2)? (STDERR) TypeError: Object #<Object> has no method 'methods' W20151024-13:16:43.165(2)? (STDERR) at Package (packages/meteorhacks_search-source/packages/meteorhacks_search-source.js:17:1) W20151024-13:16:43.165(2)? (STDERR) at Package (packages/meteorhacks_search-source/packages/meteorhacks_search-source.js:80:1) W20151024-13:16:43.166(2)? (STDERR) at /Users/emindurak/Desktop/deneme1/kitapp/.meteor/local/build/programs/server/packages/meteorhacks_search-source.js:101:4 W20151024-13:16:43.166(2)? (STDERR) at /Users/emindurak/Desktop/deneme1/kitapp/.meteor/local/build/programs/server/packages/meteorhacks_search-source.js:110:3 W20151024-13:16:43.166(2)? (STDERR) at /Users/emindurak/Desktop/deneme1/kitapp/.meteor/local/build/programs/server/boot.js:242:10 W20151024-13:16:43.166(2)? (STDERR) at Array.forEach (native) W20151024-13:16:43.166(2)? (STDERR) at Function._.each._.forEach (/Users/emindurak/.meteor/packages/meteor-tool/.1.1.9.3zwwyi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11) W20151024-13:16:43.166(2)? (STDERR) […]

如何在Meteor中为嵌套数组定义模式?

我正在使用SimpleSchema和meteor来构造数据库条目。 问题是,我有一个数组的数组和定义的模式不起作用。 这里是一个文档的例子: Courses.insert({ "persian_title":"persian title", "english_title":"english title", "free_for_all":true, "price":1000, "is_offer":false, "offer_price":500, "Seasons":[ { "title":"first Season", "free_for_all":false, "Episodes":[ { "title":"first Episode", "length":"12:10:00", "url":"test" }, { "title":"second Episode", "length":"0:10:00", "url":"test" }, { "title":"third Episode", "length":"14:10:00", "url":"test" } ] }, { "title":"Second Season", "free_for_all":false, "Episodes":[ { "title":"first Episode", "length":"12:10:00", "url":"test" }, { "title":"second Episode", "length":"0:10:00", "url":"test" }, […]

如何在非Meteor项目中使用Meteor包

我有标准的node.js REST API。 我想用一些像Minimongo,Tracker,Blaze(任何Meteor的包)的meteor包, 有很多文章如何在meteor中使用npm模块,但我有相反的任务。 我应该创build一些包装,使之成为可能使用节点模块? 还有类似的问题: 如何使用meteor以外的meteor包? 但没有人回答。

在meteor中用Flow路由器分组路由

在stream量路由器中,我有一些路由 /项目/项目名称 /项目/项目名称/任务 /项目/项目名称/任务/删除任务 /项目/项目名称/任务/完成任务 /项目/项目名称/任务/标签/学校 /项目/项目名称/任务/标签/足球 /项目/项目名称/任务/标签/培训 /项目/项目名称/任务/标签/个人 […] 所以几乎所有的路线都应该分享大部分相同的特征。 是否有任何把我的路线分组的技巧,所以我现在必须检查项目是否存在于每一个单一的路线,或者如果我可以说一些路线build立在其他路线,所以我没有写长path的所有路线? 我发现stream量路由器,但它似乎不是正确的工具来完成我所需要的。

Meteor / Iron如何在现有项目中从LESS切换到SCSS

我在Meteor / Iron做了一个小项目。 几乎没有任何样式,但很多JavaScript已经编码。 我想更新系统来处理SCSS而不是LESS,因为它似乎更适合于这个特定的项目。 我无法find任何地方如何做这样的事情,你有什么想法吗? 我必须手动做一切吗?

MeteorJS订阅机制

我有一个关于meteor订阅/发布的问题。 当你在meteor订阅一个发布,客户端数据库是更新的还是只在服务器数据库的一个副本? 事实上,Meteor会在订阅之后更新本地数据库吗,还是仅仅是T时刻的订阅时刻的服务器数据库的映像? 我可以在客户端调用Collection.find()时获取最后一个数据吗?

meteor.js – 将数组推送到用户集合

CONTEXT 我刚刚创build了一个新用户,现在想把值传递给我的用户集合中的一个数组。 我正在使用以下代码: //User Schema – in User Collection Schema.User = new SimpleSchema({ userEvents: { type: [String], optional: true }, […] //User Methods – in server/methods Meteor.methods({ 'addUserEvent': function (organizerId, params) { console.log(organizerId); console.log(params); Meteor.users.update({ organizerId: organizerId },{ $set:params }); } }); //Create new event and add ID of event to current user – in […]

在meteor方法中承诺后插入到集合中

我正在使用这个Gumroad-API npm包来从外部服务(Gumroad)获取数据。 不幸的是,它似乎使用了一个.then()结构,可以得到一些有点笨拙,你会发现如下: 这是我的meteor法: Meteor.methods({ fetchGumroadData: () => { const Gumroad = Meteor.npmRequire('gumroad-api'); let gumroad = new Gumroad({ token: Meteor.settings.gumroadAccessKey }); let before = "2099-12-04"; let after = "2014-12-04"; let page = 1; let sales = []; // Recursively defined to continue fetching the next page if it exists let doThisAfterResponse = (response) => { […]

meteor:错误:ENOTEMPTY:部署到Modulus时目录不为空

我正在将一个Meteor应用程序部署到Modulus.io。 在过去的几天里我没有任何问题,但是在对应用程序进行了一些更改之后,我现在得到以下错误: Error: ENOTEMPTY: directory not empty 它发生在剧本的最后阶段,这里是从terminal的完整日志: 部署 – > v0.10.36上传完成的构build。 configuration和部署软件包到伺服器… fs.js:807 return binding.rmdir(pathModule._makeLong(path)); ^ Error: ENOTEMPTY: directory not empty, rmdir '/Users/andreaswest/Documents/workspace/test2/.demeteorized' at Error (native) at Object.fs.rmdirSync (fs.js:807:18) at Object.removeSync (/usr/local/lib/node_modules/modulus/node_modules/fs-tools/lib/fs-tools.js:420:8) at /usr/local/lib/node_modules/modulus/lib/controllers/project.js:279:21 at /usr/local/lib/node_modules/modulus/lib/controllers/project.js:383:19 at /usr/local/lib/node_modules/modulus/lib/controllers/project.js:354:9 at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/modulus/lib/librarian/http.js:134:9) at emitNone (events.js:73:20) at IncomingMessage.emit (events.js:167:7) at endReadableNT (_stream_readable.js:906:12) 谁能帮忙?