HubSpot / offline

Automatically display online/offline indication to your users
http://github.hubspot.com/offline/docs/welcome
MIT License
8.64k stars 846 forks source link

Publish to NPM? #253

Closed whmountains closed 7 years ago

whmountains commented 7 years ago

It would be really nice!

FranDias commented 7 years ago

@geekjuice Anything special with that?

whmountains commented 7 years ago

Just add a package.json and then define module.exports if you detect a commonjs environment.

whmountains commented 7 years ago

Here's an example of the type of logic that's required:

https://github.com/kriskowal/q/blob/master/q.js

That particular library also supports quite a few other formats, but you only need commonjs to publish to npm.

whmountains commented 7 years ago

I see that you're using Grunt for build automation. In that case probably the easiest way to do it would be with https://github.com/bebraw/grunt-umd

also commented 7 years ago

Hey @whmountains, offline is published to npm as offline-js. The recent language updates haven't been published yet, and we'll get to that soon. Otherwise, the way we publish the package isn't going to change, as we aren't maintaining this project any more.

also commented 7 years ago

I've published v0.7.19 to npm.

https://www.npmjs.com/package/offline-js