Meteor-Community-Packages / check-npm-versions

Enforces "peer" npm dependencies in Meteor 1.3+ Atmosphere packages.
MIT License
11 stars 10 forks source link

Client-only? #8

Closed lorensr closed 4 years ago

lorensr commented 8 years ago

Should this be used only on client? (Is there any cost to duplicate npm packages on server?) If not, then readme should note to check client-side npm packages on client, server-side on server. Maybe a pattern like:

import { Meteor } from 'meteor/meteor';
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';

// common
checkNpmVersions({
  'lodash': 'foo'
}, 'apollo');

if (Meteor.isClient) {
  checkNpmVersions({
    'apollo-client': '^0.3.12'
  }, 'apollo');
} else {
  checkNpmVersions({
    'apollo-server': '^0.1.1',
    'express': '^4.13.4',
    'http-proxy-middleware': '^0.15.0'
  }, 'apollo');
}
copleykj commented 4 years ago

I think this should only be used on the server. There's no need to check on the client.