MeteorPackaging / discussions

Ask for Meteor integration help, or discuss Meteor 3rd party library packaging
5 stars 1 forks source link

Wrapping via npm #25

Open dandv opened 9 years ago

dandv commented 9 years ago

While thinking about sister repos and replacing the version via gulp, I saw this new to me method of wrapping a package:

Npm.depends({
  'chance': version
});

Package.onUse(function(api) {
  api.export('Chance')
  api.addFiles('.npm/package/node_modules/chance/chance.js', ['client'])
  api.addFiles('export.js');
});

Thoughts?

raix commented 9 years ago

Looks ok

splendido commented 9 years ago

perhaps might be tricky to track bugs (if any)?