Publish to npm instead of atmosphere
See original GitHub issueThis would probably resolve #35 We could rely on meteor globals with this pattern:
function getMeteorGlobal(packageName, globalName) {
if (!global.Package || !global.Package[packageName]) return
return global.Package[packageName][globalName]
}
const Mongo = getMeteorGlobal('mongo', 'Mongo') // from core package
const RedisOplog = getMeteorGlobal('cultofcoders:redis-oplog', 'RedisOplog') // from atmosphere package
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Where to publish? Atmosphere vs NPM - packages - Meteor forums
On my personal opinion, I would start publishing everything to NPM, but is it possible to add dependencies to Meteor Packages on NPM...
Read more >Deprecate atmosphere packages? · Discussion #11765 - GitHub
Here's the suggestion, in rough form: Deprecate atmoshpere packages entirely. Extend npm package. json (for packages) to add Meteor specific items, like the ......
Read more >Unpublish package from Atmosphere - meteor - Stack Overflow
There is a temporary, undocumented way to do this: Log into the atmosphere website with the same details you used to publish your...
Read more >Writing Packages | Meteor Guide - GitHub Pages
You can share your package with others by publishing it to the npm registry. While most packages are public, you can control who...
Read more >npm-publish - npm Docs
By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a scope...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just a note that merely moving to npm doesn’t automatically mean support for 1.2.x. It would also depend on not using any of the Meteor core or packages APIs that are not available in 1.2.x. That would be difficult to control since versions of Meteor packages cannot be controlled through NPM. We might have to rely on unit tests. But I’d worry about it only after the move to npm is complete.
@maxnowack nice initiative with
meteor-globals
!For unit testing, there already seems to be supporting packages like https://github.com/Astrocoders/meteor-mocks and https://github.com/meteor-velocity/meteor-stubs. I haven’t used them personally though.
Here it is: https://github.com/maxnowack/meteor-npm-package It uses this small package to get globals from meteor: https://github.com/maxnowack/meteor-globals
I think the easiest way to depend on a meteor package would be, to check if the package is there and otherwise log a message, throw an exception and kill the process. What do you think?