{"id":17659728,"url":"https://github.com/raphamorim/ranza","last_synced_at":"2025-05-07T15:02:44.437Z","repository":{"id":28906702,"uuid":"32431566","full_name":"raphamorim/ranza","owner":"raphamorim","description":"The dependency checker","archived":false,"fork":false,"pushed_at":"2015-07-18T04:03:27.000Z","size":961,"stargazers_count":30,"open_issues_count":4,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-26T02:17:50.083Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ranza","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raphamorim.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-18T01:50:10.000Z","updated_at":"2020-08-08T02:16:36.000Z","dependencies_parsed_at":"2022-08-03T06:15:49.723Z","dependency_job_id":null,"html_url":"https://github.com/raphamorim/ranza","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Franza","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Franza/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Franza/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Franza/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphamorim","download_url":"https://codeload.github.com/raphamorim/ranza/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242980783,"owners_count":20216283,"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":[],"created_at":"2024-10-23T16:08:06.604Z","updated_at":"2025-03-11T05:33:14.167Z","avatar_url":"https://github.com/raphamorim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ranza\n\n\u003e The dependency checker\n\n[![NPM Version](https://img.shields.io/npm/v/express.svg?style=flat)](https://www.npmjs.org/package/ranza)\n[![Build Status](https://travis-ci.org/raphamorim/ranza.svg)](https://travis-ci.org/raphamorim/ranza)\n\nQuickly spot any dependency required in the project and not listed in `package.json`. And also the other way around: quickly remove listed dependencies that are not being used.\n\n**Supports ES5 / ES6**\n\n# Why use ranza?\n\nAvoid accumulation of dependencies that are not being used.\n\n## Getting Started\n\nWith [node](http://nodejs.org/) and [npm](https://www.npmjs.org/) installed, install ranza with a single command.\n\n##### As CLI\n\n```sh\n$ npm install -g ranza\n```\n\n##### As Node Module\n\n```sh\n$ npm install ranza\n```\n\n## CLI Usage\n\n#### Status\n\nChecks all project for required dependencies and confirms if they are listed on `package.json`:\n\n```sh\n$ ranza status\n```\n\nYou can use status with debug option as arguments, to best view requires status showing the occurrence files, ex:\n\n**input:**\n\n```sh\n$ ranza status --debug\n```\n\n**some output example:**\n\n```sh\nDefined and used:\n  • babel-core\n     =\u003e lib/new.js\n\n  • bluebird\n     =\u003e core/src/comparer.js\n     =\u003e core/src/manager.js\n     =\u003e core/src/sentinel.js\n\nDefined, but unused:\n  • grunt\n  • babel\n```\n\n#### Install\n\nInstalls all dependencies required throughout the project, but do not save them in `package.json`:\n\n```sh\n$ ranza install\n```\n\nInstalls all dependencies required throughout the project and add them to `package.json` as `dependencies`:\n\n```sh\n$ ranza install --save\n```\n\nInstalls all dependencies required throughout the project and save them in `package.json` as `devDependencies`:\n\n```sh\n$ ranza install --save-dev\n```\n\n#### Clean\n\nRemove and clean all unused dependencies from `package.json`:\n\n```sh\n$ ranza clean\n```\n\n## Node Module Usage\n\n### Status\n\nYou can check the dependencies status from current project using:\n\n```javascript\nvar ranza = require('ranza');\n\nranza.status(function(status) {\n\t/* \n\tstatus = { \n\t\tundefinedUsed: [], \n\t\tdefinedUnused: [ 'ejs'], \n\t\tdefinedUsed: [ 'express', 'kenobi' ] \n\t}\n\t*/\n\n\tconsole.log(status)\n});\n```\n\n### Check\n\nReturn dependencies (require and import) from current file using:\n\n```javascript\nvar ranza = require('ranza');\n\nranza.check('file.js', function(dependencies, err) {\n    console.log(dependencies) // ['kenobi', 'bluebird']\n    console.log(err) // null\n});\n```\n\n\n## History\n\nSee [Changelog](docs/changelog.md) for more details.\n\n## Contributing\n\nDon't be shy, send a Pull Request! Here is how:\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -m 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## About\n\n**License:** MIT ® [Raphael Amorim](https://github.com/raphamorim)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphamorim%2Franza","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphamorim%2Franza","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphamorim%2Franza/lists"}