meteorite

How to get the current directory within a meteor Smart Package

六月ゝ 毕业季﹏ 提交于 2019-12-07 13:42:00
问题 I am building a package for meteor to be published on Atmosphere and I need to get the current directory that the package is installed. I have tried process.cwd() in a file that's included in the package, but that gets the current directory of my app. The package is installed and working correctly, it just seems that the package is running in the same process as the app, hence process.cwd() is getting the current app dir. Does anyone know of a trick to get the current directory of the package

'require is not defined' in Meteor.js when including NPM package

半世苍凉 提交于 2019-12-07 11:07:17
问题 I'm trying to use a npm package from Meteor.js (Release 0.6.6.3) using Meteor.require . However it throws an error saying that require is not defined. Why is this and how can we solve it? mrt add npm npm install github packages.json { "github": "0.1.8" } github.js var GITHUB = Meteor.require('github'); Error ReferenceError: require is not defined The npm package has lines such as var https = require('https') var url = require('url') var crypto = require('crypto') Must the package's code be

Meteor template helper conditional returns false consistently

▼魔方 西西 提交于 2019-12-07 07:03:05
问题 Im very new to Meteor but so far Im really enjoying coding on the platform. I have come up against a bit of hurdle and cant seem to find the correct way. I want to create a helper function that will check lat and long and check it against some predefined range if it falls in between these it returns true. I have included the code I currently have: Template.header.helpers({ locationCheck: function() { navigator.geolocation.getCurrentPosition(success_callback,error_callback); function success

metor blade template throws “second landmark in same branch” exception in for loop

让人想犯罪 __ 提交于 2019-12-07 06:09:08
问题 I have a for loop that I want to include a template view in: table.blade: #game h1= table.name -if( table.playerSitting() ) a.btn.btn-danger.stand(href="#") Stand #table -for (var i=0; i<7;i++) include 'seat' exposing i seat.blade: - id = 'p' + (i+1) div(id="#{id}") -if (table.hasAt(i)) p= table.usernameAt(i) -else -if( !table.playerSitting() ) a.btn.btn-inverse.sit(href="#", data-key="#{i}") Sit -else p   When I first load the view, everything draws fine. But if I sit or stand, or go to

What's the difference between Meteor and Meteorite (mrt)?

三世轮回 提交于 2019-12-06 17:15:11
问题 For example, some sites tell me to use mrt add accounts-ui (using Meteorite, right?) and others say meteor add accounts-ui . From what I understand, Meteorite is just a version control / package manager. Is this correct? What is the difference between the two commands above? 回答1: Update Meteor 0.9 release rendered Meteorite and the mrt command obsolete. All new projects should use meteor add only. Original answer meteor add works only for packages issues officially by the Meteor team (here's

meteor > error: no such package: 'accounts-urls'

青春壹個敷衍的年華 提交于 2019-12-06 10:42:49
Running latest meteor 0.6.5 i got this error: Ok, everything's ready. Here comes Meteor! => Errors while scanning packages: While building package accounts-ui-bootstrap-dropdown : error: no such package: 'accounts-urls' Any help appreciated, thnx it's because your on 0.6.5 and the package hasn't been updated yet to work with that, there was a lot of api changes in the way you format your package.js file and most packages on meteorite haven't been updated to adhere to the new style yet so they all break. Recommendation: 1 Use this command to downgrade and wait a few weeks until atmosphere

How to get the current directory within a meteor Smart Package

北慕城南 提交于 2019-12-06 04:04:43
I am building a package for meteor to be published on Atmosphere and I need to get the current directory that the package is installed. I have tried process.cwd() in a file that's included in the package, but that gets the current directory of my app. The package is installed and working correctly, it just seems that the package is running in the same process as the app, hence process.cwd() is getting the current app dir. Does anyone know of a trick to get the current directory of the package? This is what I have in the package files: package.js Package.on_use(function (api) { api.use('sync

Meteor update to 0.8.3 breaks app

廉价感情. 提交于 2019-12-05 23:50:28
Today I updated my Meteor project to version 0.8.3 $> [master●] % mrt update ✓ normalize.css branch: https://github.com/rithis-archive/meteor-normalize.css.git#master ✓ Meteor.cron branch: https://github.com/alexsuslov/Meteor.cron.git#master ✓ iron-router tag: https://github.com/EventedMind/iron-router.git#v0.9.1 ✓ mongodb-server-aggregation tag: https://github.com/zvictor/meteor-mongo-server.git#v1.0.3 ✓ reactive-publish tag: https://github.com/Diggsey/meteor-reactive-publish.git#v0.1.6 ✓ reststop2 tag: https://github.com/Differential/reststop2.git#v0.6.0 ✓ kadira tag: https://github.com

Meteor template helper conditional returns false consistently

半城伤御伤魂 提交于 2019-12-05 19:33:19
Im very new to Meteor but so far Im really enjoying coding on the platform. I have come up against a bit of hurdle and cant seem to find the correct way. I want to create a helper function that will check lat and long and check it against some predefined range if it falls in between these it returns true. I have included the code I currently have: Template.header.helpers({ locationCheck: function() { navigator.geolocation.getCurrentPosition(success_callback,error_callback); function success_callback(p){ // Building Latitude = 51.522206 // Building Longitude = -0.078305 var lat = parseFloat(p

'require is not defined' in Meteor.js when including NPM package

╄→гoц情女王★ 提交于 2019-12-05 16:59:41
I'm trying to use a npm package from Meteor.js (Release 0.6.6.3) using Meteor.require . However it throws an error saying that require is not defined. Why is this and how can we solve it? mrt add npm npm install github packages.json { "github": "0.1.8" } github.js var GITHUB = Meteor.require('github'); Error ReferenceError: require is not defined The npm package has lines such as var https = require('https') var url = require('url') var crypto = require('crypto') Must the package's code be manually edited to use Npm.require ? Editing them manually got rid of the errors. However theres a line: