# create-clean **Repository Path**: rolldown/create-clean ## Basic Information - **Project Name**: create-clean - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-19 - **Last Updated**: 2025-09-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Create-Clean Create-Clean is a versatile development utility designed to help developers clean up and optimize their projects. It provides a variety of operations, such as removing local file references in `README.md`, deleting unnecessary files and folders (e.g., `.DS_Store`, `node_modules`), formatting code, and compressing image resources. ## Table of Contents - [Create-Clean](#create-clean) - [Table of Contents](#table-of-contents) - [Features](#features) - [Usage](#usage) - [Clean README.md](#clean-readmemd) - [Example Output:](#example-output) - [Delete node\_modules](#delete-node_modules) - [Example Output:](#example-output-1) - [Clean .DS\_Store Files](#clean-ds_store-files) - [Example Output:](#example-output-2) - [Clean Cache Folders](#clean-cache-folders) - [Example Output:](#example-output-3) - [Format Code](#format-code) - [Example Output:](#example-output-4) - [Compress Images](#compress-images) - [Example Output:](#example-output-5) - [Contributing](#contributing) - [License](#license) - [Support](#support) --- ## Features 1. **Clean Local File References in README.md**: - Removes links to local files (e.g., `file://`) from the `README.md` file. 2. **Delete `node_modules` Folder**: - Recursively deletes the `node_modules` folder to free up space. 3. **Clean `.DS_Store` Files**: - Finds and removes all `.DS_Store` files in the project directory. 4. **Clean Cache Folders**: - Deletes common cache folders like `.cache` and `.tmp`. 5. **Auto-Format Code**: - Uses [Prettier](https://prettier.io/) to format JavaScript, TypeScript, and JSON files. 6. **Compress Images**: - Optimizes image files (`.jpg`, `.jpeg`, `.png`) using [imagemin](https://www.npmjs.com/package/imagemin). --- ## Usage To use this tool, ensure you have Node.js installed on your system. Then, run the tool directly: ```bash npm init clean ``` You will be presented with an interactive menu to select the desired operation. --- ### Clean README.md Removes local file references (e.g., `file://`) from the `README.md` file. #### Example Output: ```plaintext ✔ Successfully cleaned README.md ``` --- ### Delete node_modules Deletes the `node_modules` folder recursively. #### Example Output: ```plaintext ✔ Successfully deleted node_modules ``` --- ### Clean .DS_Store Files Finds and removes all `.DS_Store` files in the project directory. #### Example Output: ```plaintext ✔ Deleted: ./someFolder/.DS_Store ✔ Successfully cleaned 1 .DS_Store files. ``` --- ### Clean Cache Folders Deletes common cache folders like `.cache` and `.tmp`. #### Example Output: ```plaintext ✔ Deleted: ./.cache ✔ Successfully cleaned 1 cache folders. ``` --- ### Format Code Automatically formats JavaScript, TypeScript, and JSON files using [Prettier](https://prettier.io/). #### Example Output: ```plaintext ✔ Formatted: ./index.js ✔ Successfully formatted 1 code files. ``` --- ### Compress Images Optimizes image files (`.jpg`, `.jpeg`, `.png`) using [imagemin](https://www.npmjs.com/package/imagemin). #### Example Output: ```plaintext ✔ Compressed: ./images/example.jpg ✔ Successfully compressed 1 image files. ``` --- ## Contributing We welcome contributions! Please follow these steps: 1. Fork the repository. 2. Create a new branch (`git checkout -b feature/your-feature-name`). 3. Commit your changes (`git commit -m "Add some feature"`). 4. Push the branch (`git push origin feature/your-feature-name`). 5. Open a pull request. --- ## License This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. --- ## Support If you encounter any issues or have suggestions for improvement, feel free to open an issue or contact us. --- 希望这份简化的 `README.md` 能够满足您的需求!如果有其他补充或修改需求,请随时告知。