oortcloud / meteorite

Installer & smart package manager for Meteor
http://oortcloud.github.com/meteorite/
MIT License
841 stars 106 forks source link

User option to activate client/server/both part of the package #263

Closed pascoual closed 10 years ago

pascoual commented 10 years ago

Some packages work on both client and server sides such as pdf.js. A developer using only client code don't want to have dead code on server side and useless npm packages downloads (in pdf.js exemple: node-canvas and its dependencies that fake HTML5 canvas server side).

A solution (please feel free to give better solution):

Package user configuration (his needs):

Like this in smart.json:

"pdf.js": {
    "neededSides": ['client']
    or
    "neededSides": ['server']
    or
    "neededSides": ['server', 'client']
},
Package maintener mandatory configuration in package.js

Something like this: api.add_files(files, side[, isMandatory]); (default: true).

api.add_files(['myPackage.js'], 'client', false);
tmeasday commented 10 years ago

You'll need to take this up with Meteor core. I suggest the meteor-core mailing list.