0.1.1 • Published 8 months ago

clean-my-repo v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Contributors Forks Stargazers Issues MIT License LinkedIn

About The Project

Clean My Repo is an opinionated CLI tool designed to help you maintain a clutter-free repository by removing unnecessary files and folders and initializing your .gitignore file with predefined templates. The templates are based on common structures and best practices for cleaning repositories across various environments and programming languages.

Built With

  • Node
  • Typescript
  • Jest

Getting Started

Follow these steps to set up Clean My Repo locally.

Prerequisites

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repo
git clone https://github.com/Dantalian5/clean-my-repo.git
  1. Install NPM packages
npm install

Usage

Initialize the .gitignore File

To initialize your .gitignore with a specific template:

npx clean-my-repo --init -i [template]

Example:

npx clean-my-repo --init node

If no template is selected, the tool will default to the “default” template.

Clean the Repository

To clean up unwanted files and folders:

npx clean-my-repo --clean -c [template]

Example:

npx clean-my-repo --clean build

If no template is selected, the tool will default to the “default” template.

Use and save preferences

To clean up unwanted files and folders:

npx clean-my-repo 

When running the tool without arguments, an interactive series of prompts will guide the user through selecting actions and choosing templates to use. These preferences will be saved for future use, allowing for easy reuse of configurations.

Options:

• --init, -i template: Initializes .gitignore with the specified template. • --clean, -c template: Cleans the repository by deleting files and folders based on the specified template.

Available Templates:

  • node: Ignores and cleans common files and folders in Node.js projects, such as node_modules/, npm-debug.log, etc.
  • build: Cleans build directories like dist/ and build/.
  • log: Removes log files, such as npm-debug.log, yarn-debug.log, yarn-error.log*, etc.
  • test: Cleans test-related files and code coverage folders, like coverage/ and .nyc_output/.
  • framework: Ignores files specific to popular frameworks like Next.js (.next/), Nuxt.js (.nuxt/), and Parcel (.parcel-cache/).
  • os: Ignores OS-generated files, such as .DS_Store, Thumbs.db, and more.
  • backup: Removes temporary and backup files, like .tmp, .bak, and ~$*.
  • database: Ignores database files, such as .sqlite3, .db, and dump.rdb.
  • ide: Ignores files and folders specific to development environments (IDEs), like .vscode/, .idea/, and .history/.
  • design: Ignores design files, such as .sketch, .fig, and *.xd.

Roadmap

  • Add -init to populate .gitignore.
  • Add -clean to delete unnecessary files.
  • Add templates to more selective user approach
  • Add cli prompts if user not enter args
  • Add more templates
  • Add custom configuration support
  • Improve interactive prompts
  • Multi-language support for prompts

See the open issues for a full list of proposed features (and known issues).

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Acknowledgments

0.1.1

8 months ago

1.0.0

8 months ago