{"id":15984223,"url":"https://github.com/zbigg/copy-production-deps","last_synced_at":"2025-03-17T15:32:04.238Z","repository":{"id":36977644,"uuid":"250025475","full_name":"zbigg/copy-production-deps","owner":"zbigg","description":"Create production node_modules from Npm/Yarn workspace","archived":false,"fork":false,"pushed_at":"2025-01-24T04:09:18.000Z","size":212,"stargazers_count":4,"open_issues_count":14,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-08T06:48:08.097Z","etag":null,"topics":["dependencies","nodejs","yarn-workspaces"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zbigg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-25T16:03:46.000Z","updated_at":"2023-09-15T10:04:25.000Z","dependencies_parsed_at":"2024-10-27T15:17:56.226Z","dependency_job_id":"72b4f9df-4c48-4ceb-8003-d19aa2075d0c","html_url":"https://github.com/zbigg/copy-production-deps","commit_stats":{"total_commits":91,"total_committers":7,"mean_commits":13.0,"dds":0.5714285714285714,"last_synced_commit":"5dc40f70bf6bfae91ae18d1170565c646de0f2bb"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbigg%2Fcopy-production-deps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbigg%2Fcopy-production-deps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbigg%2Fcopy-production-deps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbigg%2Fcopy-production-deps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zbigg","download_url":"https://codeload.github.com/zbigg/copy-production-deps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243869422,"owners_count":20361014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dependencies","nodejs","yarn-workspaces"],"created_at":"2024-10-08T02:05:09.972Z","updated_at":"2025-03-17T15:32:03.920Z","avatar_url":"https://github.com/zbigg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Copy node production deps\n\n[![npm](https://img.shields.io/npm/v/copy-production-deps.svg?style=flat-square)](http://www.npmjs.com/package/copy-production-deps)\n[![Build status](https://travis-ci.org/zbigg/copy-production-deps.svg?branch=master)](https://travis-ci.org/zbigg/copy-production-deps)\n[![codecov](https://codecov.io/gh/zbigg/copy-production-deps/branch/master/graph/badge.svg)](https://codecov.io/gh/zbigg/copy-production-deps)\n\nFind and copy production deps of `package` living in `yarn workspace` to `dist` folder.\n\n**NOTE: This is very experimental package.**, nevertheless it's used in one internal project\nto build minimal `node_modules` for services running in docker.\n\n## Usage\n\n```shell\n# copy deps of current folder to ./dist\n$ npx copy-production-deps\n\n# copy deps specific package to specific folder\n$ npx copy-production-deps packages/foo-backend dist/foo-backend\n\n# Only dist selected packages that are not bundled with esbuild\n$ esbuild server.js --outfile dist/server.js --external:mongoose --external:hiredis\n$ npx copy-production-deps . dist --only-packages mongoose,hiredis\n```\n\n## Doc\n\nFull synopsis:\n\n```\ncopy-production-deps [packageDir] [distDir]\n\ncopy production deps from Npm/Yarn workspace to dist folder\n\nPositionals:\n  packageDir  source package folder (must contain package.json)   [default: \".\"]\n  distDir     distribution directory (packages will be copied to\n              ${distDir}/node_modules)                       [default: \"./dist\"]\n\nOptions:\n  --version       Show version number                                  [boolean]\n  --dryRun, -n    Dry run - only show what would be copied.\n                                                      [boolean] [default: false]\n  --verbose, -v   Run with verbose logging            [boolean] [default: false]\n  --exclude-from  Read ecluded file patterns from file one pattern a line.\n                                                           [array] [default: []]\n  --exclude       Exclude file pattern (minimatch glob)    [array] [default: []]\n  --only-packages Include only those packages         [array] [default: []\n  --help          Show help                                            [boolean]\n```\n\n## Why\n\nBorn from frustration that both `yarn` and `npm` have several bugs related to `--production` install and i almost wrote everywhere before i found [copy-node-modules](https://github.com/arloliu/copy-node-modules#readme) which apparently didn't support yarn workspaces.\n\n## Contribute\n\nPRs accepted.\n\n## License\n\nMIT © Zbigniew Zagórski\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbigg%2Fcopy-production-deps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzbigg%2Fcopy-production-deps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbigg%2Fcopy-production-deps/lists"}