{"id":19006978,"url":"https://github.com/yowainwright/install-perfection","last_synced_at":"2025-04-22T19:25:00.776Z","repository":{"id":145588514,"uuid":"616768095","full_name":"yowainwright/install-perfection","owner":"yowainwright","description":"Install dependencies with control 💖 ","archived":false,"fork":false,"pushed_at":"2025-04-08T05:02:38.000Z","size":1471,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T18:06:20.575Z","etag":null,"topics":["dependency-management","folder-size","install","package-management"],"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/yowainwright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-21T03:16:41.000Z","updated_at":"2025-02-20T07:42:46.000Z","dependencies_parsed_at":"2023-06-09T21:15:14.953Z","dependency_job_id":"d05903a6-7eca-4b48-8523-25b199fce27b","html_url":"https://github.com/yowainwright/install-perfection","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Finstall-perfection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Finstall-perfection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Finstall-perfection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Finstall-perfection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yowainwright","download_url":"https://codeload.github.com/yowainwright/install-perfection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250307260,"owners_count":21409058,"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":["dependency-management","folder-size","install","package-management"],"created_at":"2024-11-08T18:35:35.901Z","updated_at":"2025-04-22T19:25:00.743Z","avatar_url":"https://github.com/yowainwright.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Install Perfection\n\n![Typed with TypeScript](https://flat.badgen.net/badge/icon/Typed?icon=typescript\u0026label\u0026labelColor=blue\u0026color=555555)\n[![npm version](https://badge.fury.io/js/install-perfection.svg)](https://badge.fury.io/js/install-perfection)\n![ci](https://github.com/yowainwright/install-perfection/actions/workflows/ci.yml/badge.svg)\n[![Github](https://badgen.net/badge/icon/github?icon=github\u0026label\u0026color=grey)](https://github.com/yowainwright/install-perfection)\n\n\n_**Install dependencies with control 💪**_\n\nSometimes, you need nuance and control over your npm dependencies.\n\n\u003e You might want to minimize your `node_module` folder size when shipping to production. Or, you might want to switch dependencies on the fly. For this, **Install Perfection** might be the tool you need.\n\n---\n\n## How easy is Install Perfection to set up?\n\n#### Very easy! \n\n_If not, [submit an issue](https://github.com/yowainwright/install-perfection/issues)!_\n\nYou can use Install Perfection as a CLI only.\n```bash\nnpx install-perfection --include {\"playwright-core\": \"latest\"} --ignore {\"playwright\": \"latest\"}\n```\n\nIf you'd like to use it a bit more explicitly, you can configure it in your `package.json`.\n\n```ts\n// package.json\n{\n  ...\n  \"install\": {\n    // include this dependency\n    \"include\": {\n      \"playwright-core\": \"latest\"\n    },\n    // but don't include this one!\n    \"ignore\": {\n      \"playwright\": \"latest\"\n    }\n  }\n  ...\n}\n```\n\nOr, if you like to keep your `package.json` pure, you can create a `.installrc` file with the same configuration.\n\n```ts\n// .installrc\n{\n  \"include\": {\n    \"playwright-core\": \"latest\"\n  },\n  \"ignore\": {\n    \"playwright\": \"latest\"\n  }\n}\n```\n\nIf you'd like to build something custom, you can copy it's functionality into your own project or you can use the exported functions directly—as they're typed and tested.\n\n```ts\nimport { install } from 'install-perfection'\n\ninstall({\n  include: {\n    'playwright-core': 'latest'\n  },\n  ignore: {\n    'playwright': 'latest'\n  },\n})\n```\n\n---\n\n## How do I use Install Perfection?\n\nInstall Perfection is built to be used as a CLI _**first and foremost**_. It also exports node functions which can be used to preform the same install operation.\n\n---\n\nInstall or reference Install Perfection in your project.\n\n```bash\nnpm install install-perfection --save-dev\n```\n\n---\n\n## CLI API\n\nListed below are the CLI options and arguments to execute install-perfection. To *view all cli options, run `install-perfection --help`!\n\n```bash\nUsage: install-perfection [options]\n\nInstall dependencies with control, perfectly 💪\n\nOptions:\n  -V, --version               output the version number\n  -c, --config \u003cconfig\u003e       config path\n  --debug                     enables debug mode\n  -d, --dest \u003cstring\u003e         dest path\n  -f, --file \u003cfile\u003e           path to package.json file\n  --has-lockfile              use lock file\n  -p, --path \u003cpath\u003e           path to package.json file\n  -r, --runner \u003crunner\u003e       npm, pnpm, or yarn (bun support coming; use npm for bun now)\n  -i, --include [include...]  include dependencies, include an array of json parseable string\n                              wrapped objects, e.g. `--include '{\"foo\": \"bar\"}' '{\"biz\": \"baz\"}'\n                              `\n  --ignore [exclude...]       exclude dependencies, e.g. `--exclude foo bar`\n  -h, --help                  display help for command\n```\n\n---\n\n### Recipes\n\nInstall an additional list of dependencies.\n\n```sh\ninstall-perfection --include {\"playwright-core\": \"latest\"}' '{\"react\": \"latest\"}\n```\n\nIgnore an array of dependencies.\n\n```sh\ninstall-perfection --ignore playwright react\n```\n\nIgnore and install dependencies for Install Perfection.\n\n```sh\ninstall-perfection --ignore playwright react --include {\"playwright-core\": \"latest\"} {\"react\": \"latest\"}\n```\n\nInstall while including a lock file.\n\n```sh\ninstall-perfection --has-lockfile --ignore playwright\n```\n\nAdd a custom path to the package.json file you're installing perfection for.\n\n```sh\ninstall-perfection --path ./path/to/package.json --ignore playwright\n```\n\nAdd a custom path to install your `node_modules`.\n\n```sh\ninstall-perfection --dest ./path/to/node_modules_dest --ignore playwright\n```\n\nUse a custom runner (dependence manager)\n\n```sh\ninstall-perfection --runner pnpm --ignore playwright\n```\n\nMake it fast by inputting your config to your command.\n\n```sh\ninstall-perfection --config ./path/to/.installrc --ignore playwright\n```\n\nGet debugging information.\n\n```sh\ninstall-perfection --debug --ignore playwright\n```\n\n---\n## Node API\n\nThe node API works exactly the same as the CLI API.\n\n```ts\nimport { install } from 'install-perfection'\n\ninstall({\n  include: {\n    'playwright-core': 'latest'\n  },\n  ignore: {\n    'playwright': 'latest'\n  },\n})\n```\n\n---\n\n## Is the name, \"Install Perfection\", a bit much?\n\nYes. _Just like your `node_module` folder_. 😜 Use Install Perfection to make your node_modules _a bit less_.\n\n---\n\nMade by [@yowainwright](https://github.com/yowainwright), MIT 2023\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyowainwright%2Finstall-perfection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyowainwright%2Finstall-perfection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyowainwright%2Finstall-perfection/lists"}