{"id":20626823,"url":"https://github.com/mikbry/packito","last_synced_at":"2025-06-22T17:33:36.930Z","repository":{"id":36596396,"uuid":"228603017","full_name":"mikbry/packito","owner":"mikbry","description":"Packito cleans your npm package before publishing it !","archived":false,"fork":false,"pushed_at":"2023-01-06T13:40:12.000Z","size":923,"stargazers_count":15,"open_issues_count":15,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T21:51:06.327Z","etag":null,"topics":["cli","cli-app","es6","lerna","nodejs","np","npm","npm-package","npm-publish","yarn"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mikbry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-17T11:35:57.000Z","updated_at":"2024-11-24T19:05:05.000Z","dependencies_parsed_at":"2023-01-17T03:00:49.742Z","dependency_job_id":null,"html_url":"https://github.com/mikbry/packito","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikbry%2Fpackito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikbry%2Fpackito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikbry%2Fpackito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikbry%2Fpackito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikbry","download_url":"https://codeload.github.com/mikbry/packito/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094944,"owners_count":21211838,"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":["cli","cli-app","es6","lerna","nodejs","np","npm","npm-package","npm-publish","yarn"],"created_at":"2024-11-16T13:14:48.261Z","updated_at":"2025-04-15T15:21:39.282Z","avatar_url":"https://github.com/mikbry.png","language":"JavaScript","readme":"# 📦 Packito\n\n[![Build Status][travis-image]][travis-url]\n[![codecov][codecov-image]][codecov-url]\n[![NPM version][npm-image]][npm-url]\n[![License][license-image]][license-url]\n\n[travis-image]: https://travis-ci.com/mikbry/packito.svg?branch=master\n[travis-url]: https://travis-ci.com/mikbry/packito\n[codecov-image]: https://codecov.io/gh/mikbry/packito/branch/master/graph/badge.svg?token=K4P0vnM5fh\n[codecov-url]: https://codecov.io/gh/mikbry/packito\n[npm-image]: https://img.shields.io/npm/v/packito.svg\n[npm-url]: https://npmjs.org/package/packito\n[license-image]: https://img.shields.io/npm/l/packito.svg\n[License-url]:./LICENSE\n\n\u003e Packito is a cli tool to clean package before publishing it.\n\n\n### Purpose\nBefore publishing to npm, did you take care of your package.json ?\n\n* devDependencies, some scripts and other entries(\"husky\", ...) could be removed.\n* add some new or change entries, like \"main\" source file name\n* use a dist file and copy some extra files/directories in it (README.md, LICENSE, ...).\n* and finally publish your package using npm, np or lerna.\n\n***Simple using one command:***\n```bash\n$ packito\n```\nBy default it will remove \"scripts\" and \"devDependencies\", copy README.md and LICENSE if they exist to './dist' folder.\n\n### Install\n```bash\n$ yarn add --dev packito\n```\n\nOr using npm\n```bash\n$ npm add --dev packito\n```\n\n### Usage\n```bash\n$ packito [options] [bin-to-publisher]\n```\n\n***Options***\n\n| name | alias | description |\n| ----------- | --- | ----------- |\n| --dist     | -d | Path to publish from |\n| --nopublish     | -n | Skips publishing step |\n| --help     | -h | Displays help informations |\n\n***Bin to publisher***\n\n| name | description |\n| -----------  | ----------- |\n| npm     | Publish using npm |\n| lerna     | Publish using npm |\n| np     | Publish using np |\n\n\n***.packito.json***\n\nIt is the configuration file.\nThis json should be at root of the project, a sample:\n```json\n{\n  \"remove\": {\n    \"devDependencies\": \"*\",\n    \"scripts\": \"*\",\n    \"type\": true,\n    \"esm\": true,\n    \"husky\": true,\n    \"commitlint\": true\n  },\n  \"replace\": {\n    \"main\": \"index.js\",\n    \"module\": \"index.mjs\"\n  },\n  \"publisher\":  \"np\"\n}\n```\n\n| name | type | description |\n| ----------- | --- | ----------- |\n| remove     | object | all keys to remove from packages.json (if =true or ='*' replace all) |\n| replace     | object | all keys+values to replace in packages.json |\n| copy     | object | all files to copy in dist |\n| output     | string | folder to publish to |\n| publisher     | string\\|object | The publisher to use (npm, np, lerna) |\n\n***Other command examples***\n\u003e Publish to path 'publish'\n```bash\n$ packito -d ./publish\n```\n\u003e Publish to path 'publish' and use `np patch`to publish\n```bash\n$ packito -d ./publish np patch\n```\n\n### Coded using state of the art and simplicity in mind\n- Simple to use\n- Modern ES6+ syntax (import instead of require, await/async, ...)\n- Follows [Node best practices](https://github.com/goldbergyoni/nodebestpractices)\n\n### Requirements\n- Node \u003e= 12\n\n## Contribution\n\nRead [Contributing Guide](CONTRIBUTING.md) for development setup instructions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikbry%2Fpackito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikbry%2Fpackito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikbry%2Fpackito/lists"}