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):
server side code only
client side code only
both (default)
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).
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:
Package maintener mandatory configuration in package.js
Something like this: api.add_files(files, side[, isMandatory]); (default: true).