-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import tracker dep #17
base: master
Are you sure you want to change the base?
Conversation
@Akryum can you please merge this and publish a release? |
This doesn't work for me.
|
@Akryum that's strange, it's right from the official docs and works for me |
This is a NPM package, not Meteor package. So I am not sure this applies. |
@mitar It's an npm package but it will only ever be used in the context of a Meteor application so the This shouldn't have any functional difference, it just makes it play nicely with other tools like Jest which make some assumptions about your code explicitly declaring imports |
Strange. I just tried it in my Meteor app and it throws the error. Maybe there is an issue with Meteor not processing imports in npm packages the same way it does in app/atmosphere code? |
|
In Jest I think this will work: beforeEach(() => {
window.Tracker = Tracker
}) |
I'm not sure of how the meteor build system differs between its treatment of npm packages and atmosphere packages This is what I'm using in my package.json right now "vue-meteor-tracker": "ejfrancis/vue-meteor-tracker#import-tracker-checkin-build", then in my client index I'm just importing it as usual and it works import VueMeteorTracker from 'vue-meteor-tracker'; I'm on Meteor 1.6.1.1 @mitar the official Meteor docs still state that some day all packages will be moved to npm, so I think we should be trying to keep packages on npm if possible but you are right that they do state that one of the scenarios when you should use atmosphere package is if @Akryum I believe you're right about the |
I do not think this will really happen any time soon, we are waiting for two years here on this: meteor/blaze#13 So i would not bet things on this. In any case, until they are on NPM, you cannot depend on them. |
It's true that an npm package can't declare a dependency on a Meteor package at a package-level, so this package is in a bit of a strange state because it does explicitly depend on |
(for #16)
I've only tested this by adding the dependency in
package.json
with thefile://
specifier, working fine for me.