{"id":15691644,"url":"https://github.com/zkochan/publish-packed","last_synced_at":"2025-11-12T22:13:34.527Z","repository":{"id":45168725,"uuid":"80380353","full_name":"zkochan/publish-packed","owner":"zkochan","description":"Publishes a package together with its dependencies","archived":false,"fork":false,"pushed_at":"2025-03-03T15:45:30.000Z","size":590,"stargazers_count":8,"open_issues_count":15,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-05T12:33:56.689Z","etag":null,"topics":["bundle","pack","publishing"],"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/zkochan.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":"2017-01-29T23:28:55.000Z","updated_at":"2024-07-05T12:16:00.000Z","dependencies_parsed_at":"2024-02-04T12:36:41.421Z","dependency_job_id":"1f2218ea-ce19-4eda-81ac-6b98373a58d4","html_url":"https://github.com/zkochan/publish-packed","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkochan%2Fpublish-packed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkochan%2Fpublish-packed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkochan%2Fpublish-packed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkochan%2Fpublish-packed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkochan","download_url":"https://codeload.github.com/zkochan/publish-packed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501860,"owners_count":21114683,"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":["bundle","pack","publishing"],"created_at":"2024-10-03T18:22:37.542Z","updated_at":"2025-11-12T22:13:34.483Z","avatar_url":"https://github.com/zkochan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# publish-packed\n\n[![npm version](https://img.shields.io/npm/v/publish-packed.svg)](https://www.npmjs.com/package/publish-packed)\n[![Status](https://travis-ci.org/zkochan/publish-packed.svg?branch=master)](https://travis-ci.org/zkochan/publish-packed \"See test builds\")\n\n\u003e Publishes a package together with its dependencies\n\nWhen publishing a package, dependencies are not bundled with the package.\nAlthough you could use [bundledDependencies](https://docs.npmjs.com/files/package.json#bundleddependencies),\nyou have to list all the dependencies you want to bundle.\n\n`publish-packed` bundles all dependencies with your package:\n\n1. it installs all your dependencies first\n1. it moves the `node_modules` folder from the root of your package to `lib/node_modules`\n\n   When publishing, npm ignores the `node_modules` folder in the root of your package. However,\n   it packs all `node_modules` in subfolders.\n1. it escapes the `dependencies` field in your package's `package.json`, so during installation\nno dependencies of your package will be installed, except optional dependencies.\n1. it can prune `node_modules`, removing markdown files, tests, configs and other resources that are not code\n\nLimitations:\n\n1. you can use `publish-packed` only if all your source code is in the `lib/` directory\nbecause all your dependencies are going to be inside `lib/node_modules`.\n2. you can use `publish-packed` only if your prod dependencies don't have lifecycle events like `postinstall`\nthat should be executed during installation\n\n## Installation\n\n```\n\u003cnpm|pnpm|yarn\u003e add -D publish-packed\n```\n\n## Usage\n\nAdd `publish-packed` to the `prepublishOnly` and `postpublish` scripts of your `package.json`:\n\n```json\n  \"scripts\": {\n    \"prepublishOnly\": \"publish-packed\",\n    \"postpublish\": \"publish-packed\"\n  }\n```\n\nTo publish the package, just run `\u003cnpm|pnpm|yarn\u003e publish`.\n\n## License\n\n[MIT](LICENSE) © [Zoltan Kochan](https://www.kochan.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkochan%2Fpublish-packed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkochan%2Fpublish-packed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkochan%2Fpublish-packed/lists"}