-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish npm for the nodejs images #23
Comments
I don’t follow your comment Your saying to publish the proxy code as an external library on npm? Actions don’t need this as it’s a proxy that it’s already present and runs your code. You don’t need to include it I have being thinking on including the code in the “openwhisk” npm package and have it expose via something openwhsik.proxy() |
I am suggesting that there is a npm that defines all the dependencies already deployed into the nodejs8Action docker container so that, those who are developing functions can include that in their own project.json files and get the current list of provided dependencies, without having to try and work out what they are by trial and error or reading GitHub. For those that are using webpack or some other npm packager in their own package, they can also mark the container npm as external and reduce the size of their deployment bundle. All you need to do to achieve this is publish https://github.com/apache/incubator-openwhisk-runtime-nodejs/blob/master/core/nodejs8Action as a npm using its package.json file as the descriptor. |
@csantanapr it's not about inclusion but about exclusion of modules that are provided on the target environment, i.e. the nodejs container. This is critical if Using an npm module for this allows for a detailed sharing of the list of "provided' dependencies between the provider (this repository) and action authors, including the exact versions of these dependencies. The npm module can be versioned itself to correspond with new versions of the nodejs action docker images. That npm module would not include any own javascript - just a This is especially interesting for the nodejs6 container which has a lot of useful dependencies. |
Ok thanks both @ieb and @alexkli for the explanation. I have some more questions. npm supports npm dependencies hosted on github would that be enough to configure users package.json and webpack? Are any of you using IBM Functions hosted solution? I offer nodejs:8 and includes a large set of dependencies and the runtime is on github maybe something similar there would help? |
If the npm package that is defined by https://github.com/apache/incubator-openwhisk-runtime-nodejs/blob/master/core/nodejs8Action/package.json was published to npm then projects would be able to depend on it and get the current set of js dependencies present in OW. Those projects building with webpack would also be able to exclude those packages from their builds, making their images smaller.
The text was updated successfully, but these errors were encountered: