socket-ntp icon indicating copy to clipboard operation
socket-ntp copied to clipboard

Browserify support

Open gre opened this issue 10 years ago • 2 comments

Hi, socket-ntp is currently not browserify compliant. Here is how we can make it compliant:

in package.json, add:

"browser": "client/ntp"

in client/ntp.js:

  if (typeof require === 'function') {
    module.exports = ntp;
  }
  else if (typeof define === 'function' && define.amd) {
    define('ntp', [], function () {
      return ntp;
    });
  } else {
    root.ntp = ntp;
  }

Thanks

gre avatar Dec 12 '14 09:12 gre

I'd like this.

bwestergard avatar Jan 16 '16 18:01 bwestergard

Totally, happy to accept a PR for it! This code hasn't been maintained recently

calvinfo avatar Jan 19 '16 21:01 calvinfo