docs: add npm copy rfc
npm copy <destination> copies the current project's files and dependencies to
destination
When deploying a project (COPY into a docker image, zip into an archive)
non production dependencies and files should be excluded. npm has some commands
that cover this usecase (prune, pack, install -g but they each have
issues, especially when workspaces are used.
# copy app's production dependencies and packaged files to out
npm copy out --production -w app
# copy all workspace production dependencies and packaged files to archive
npm copy out --production --workspaces
See 0000-npm-copy.md
I've written an implementation here npm/cli#4082
I think this RFC addresses npm/rfcs#463 Multi-app Monorepo Support
Seems like a nice command. Just reiterating what I said in the RFC, want to make sure this works well for non-workspace users in addition to workspaces (which it seems to!).
I can't wait for this to land. Packaging workspaces for deployment is a guaranteed headache.
Removing Agenda label as we have discussed this work & agree we'd like to see it land. We can ratify this doc at any point here.