rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

docs: add npm copy rfc

Open everett1992 opened this issue 4 years ago • 4 comments

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

everett1992 avatar Nov 15 '21 23:11 everett1992

I think this RFC addresses npm/rfcs#463 Multi-app Monorepo Support

everett1992 avatar Nov 17 '21 18:11 everett1992

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!).

bnb avatar Nov 17 '21 19:11 bnb

I can't wait for this to land. Packaging workspaces for deployment is a guaranteed headache.

jeanbmar avatar Feb 08 '22 14:02 jeanbmar

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.

darcyclarke avatar Apr 20 '22 15:04 darcyclarke