{"_id":"00akshatsinha00decomment","_rev":"2-c240e8862e578449577351a75aea4c35","name":"00akshatsinha00decomment","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"00akshatsinha00decomment","version":"1.0.0","keywords":["cli","comments","remove","strip","decomment","source-code","javascript","typescript","css","html","code-cleanup","developer-tools","build-tools","preprocessing"],"author":{"name":"00akshatsinha00","email":"contact@example.com"},"license":"ISC","_id":"00akshatsinha00decomment@1.0.0","maintainers":[{"name":"00akshatsinha00","email":"akshatsinhasramhardy@gmail.com"}],"homepage":"https://github.com/00akshatsinha00/00akshatsinha00decomment#readme","bugs":{"url":"https://github.com/00akshatsinha00/00akshatsinha00decomment/issues"},"bin":{"00akshatsinha00decomment":"bin/document.js"},"dist":{"shasum":"8c32d17f3fa3919274981734dcb02eafa3f297c5","tarball":"https://registry.npmjs.org/00akshatsinha00decomment/-/00akshatsinha00decomment-1.0.0.tgz","fileCount":5,"integrity":"sha512-zj1jrYJK+meo2ujmfsiGViYM5hnqG2xfwr6IpfF1D3ZRZrsg4q0xYhCU5iN0CDQHn7dtiH7AfT+GeSrJ2m3mpw==","signatures":[{"sig":"MEUCIFNAe4Hz4A+zozbQV+ib5uyUREJf3KMdEjG5ujcUo8yRAiEAh2/YuXD56dFB1G88XJAGulV/DDcEB8EnmBH1ttp+1j8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14171},"main":"bin/document.js","type":"commonjs","engines":{"node":">=14.0.0"},"scripts":{"dev":"node bin/document.js","lint":"echo 'No linting configured'","test":"jest","clean":"rimraf coverage dist","start":"node bin/document.js","verify":"node scripts/verify-package.js","prepack":"npm run test:ci","test:ci":"jest --ci --coverage --watchAll=false","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"npm run test:ci"},"_npmUser":{"name":"00akshatsinha00","email":"akshatsinhasramhardy@gmail.com"},"repository":{"url":"git+https://github.com/00akshatsinha00/00akshatsinha00decomment.git","type":"git"},"_npmVersion":"11.3.0","description":"A CLI tool to remove comments from source code files","directories":{},"_nodeVersion":"22.16.0","dependencies":{"glob":"^11.0.3","commander":"^14.0.0","strip-comments":"^2.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/00akshatsinha00decomment_1.0.0_1752756623009_0.09529534726051625","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"00akshatsinha00decomment","version":"1.1.0","description":"A CLI tool to remove comments from source code files","main":"bin/document.js","bin":{"00akshatsinha00decomment":"bin/document.js"},"scripts":{"test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","test:ci":"jest --ci --coverage --watchAll=false","lint":"echo 'Linting check passed - no linter configured yet'","clean":"rimraf coverage dist","prepublishOnly":"npm run test:ci","prepack":"npm run test:ci","verify":"node scripts/verify-package.js","start":"node bin/document.js","dev":"node bin/document.js"},"keywords":["cli","comments","remove","strip","decomment","source-code","javascript","typescript","css","html","code-cleanup","developer-tools","build-tools","preprocessing"],"author":{"name":"00akshatsinha00","email":"contact@example.com"},"license":"ISC","homepage":"https://github.com/00akshatsinha00/00akshatsinha00decomment#readme","repository":{"type":"git","url":"git+https://github.com/00akshatsinha00/00akshatsinha00decomment.git"},"bugs":{"url":"https://github.com/00akshatsinha00/00akshatsinha00decomment/issues"},"type":"commonjs","engines":{"node":">=14.0.0"},"dependencies":{"commander":"^14.0.0","glob":"^11.0.3","strip-comments":"^2.0.1"},"devDependencies":{"jest":"^30.0.4"},"_id":"00akshatsinha00decomment@1.1.0","gitHead":"0b5607b0fb1ab8763ffa781c8a035a30f2e2e926","_nodeVersion":"22.16.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-uofG5FNSzjjZbstDXajJDKGij0W1KDEiCVcnhhMhyNT049wPdm86OcY+IT8NA6UqXm+8kFBLV5cNVEGIz/feEQ==","shasum":"6f99b4497a441423e98acfd827cbc6615f34df63","tarball":"https://registry.npmjs.org/00akshatsinha00decomment/-/00akshatsinha00decomment-1.1.0.tgz","fileCount":5,"unpackedSize":15786,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBplvrG5KKMK+EKpHupo6Qelf1reY2U7RgxiYWxInmxjAiEAuS5Dz8t00cwUlfcbEwnk9TfF7JszRiBnmofFa0cjKhk="}]},"_npmUser":{"name":"00akshatsinha00","email":"akshatsinhasramhardy@gmail.com"},"directories":{},"maintainers":[{"name":"00akshatsinha00","email":"akshatsinhasramhardy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/00akshatsinha00decomment_1.1.0_1752773182994_0.8560127439538459"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-17T12:50:23.008Z","modified":"2025-07-17T17:26:23.364Z","1.0.0":"2025-07-17T12:50:23.172Z","1.1.0":"2025-07-17T17:26:23.166Z"},"bugs":{"url":"https://github.com/00akshatsinha00/00akshatsinha00decomment/issues"},"author":{"name":"00akshatsinha00","email":"contact@example.com"},"license":"ISC","homepage":"https://github.com/00akshatsinha00/00akshatsinha00decomment#readme","keywords":["cli","comments","remove","strip","decomment","source-code","javascript","typescript","css","html","code-cleanup","developer-tools","build-tools","preprocessing"],"repository":{"type":"git","url":"git+https://github.com/00akshatsinha00/00akshatsinha00decomment.git"},"description":"A CLI tool to remove comments from source code files","maintainers":[{"name":"00akshatsinha00","email":"akshatsinhasramhardy@gmail.com"}],"readme":"# 00akshatsinha00decomment\r\n\r\n[![CI/CD Pipeline](https://github.com/00akshatsinha00/00akshatsinha00decomment/actions/workflows/ci.yml/badge.svg)](https://github.com/00akshatsinha00/00akshatsinha00decomment/actions/workflows/ci.yml)\r\n[![Security Analysis](https://github.com/00akshatsinha00/00akshatsinha00decomment/actions/workflows/security.yml/badge.svg)](https://github.com/00akshatsinha00/00akshatsinha00decomment/actions/workflows/security.yml)\r\n[![Release](https://github.com/00akshatsinha00/00akshatsinha00decomment/actions/workflows/release.yml/badge.svg)](https://github.com/00akshatsinha00/00akshatsinha00decomment/actions/workflows/release.yml)\r\n[![codecov](https://codecov.io/gh/00akshatsinha00/00akshatsinha00decomment/branch/main/graph/badge.svg)](https://codecov.io/gh/00akshatsinha00/00akshatsinha00decomment)\r\n[![npm version](https://badge.fury.io/js/00akshatsinha00decomment.svg)](https://badge.fury.io/js/00akshatsinha00decomment)\r\n[![Node.js Version](https://img.shields.io/node/v/00akshatsinha00decomment.svg)](https://nodejs.org/)\r\n\r\nA powerful command-line tool that removes comments from your source code files while preserving the functionality of your code. Perfect for cleaning up codebases, preparing code for production, or creating comment-free versions of your files.\r\n\r\n## Installation\r\n\r\nYou can use this tool directly with npx without installing it globally:\r\n\r\n```bash\r\nnpx 00akshatsinha00decomment -w .\r\n```\r\n\r\nOr install it globally if you prefer:\r\n\r\n```bash\r\nnpm install -g 00akshatsinha00decomment\r\n```\r\n\r\n## Quick Start\r\n\r\nRemove comments from all files in the current directory:\r\n\r\n```bash\r\nnpx 00akshatsinha00decomment -w .\r\n```\r\n\r\nRemove comments from specific JavaScript files:\r\n\r\n```bash\r\nnpx 00akshatsinha00decomment -w *.js\r\n```\r\n\r\nPreview changes without modifying files:\r\n\r\n```bash\r\nnpx 00akshatsinha00decomment myfile.js\r\n```\r\n\r\n## Usage\r\n\r\n```\r\n00akshatsinha00decomment [options] <glob...>\r\n\r\nArguments:\r\n  glob                    glob pattern(s) of files to decomment\r\n\r\nOptions:\r\n  -V, --version          output the version number\r\n  -w, --write            overwrite files in-place\r\n  -o, --out <dir>        write cleaned files to specified directory\r\n  -h, --help             display help for command\r\n```\r\n\r\n## Options Explained\r\n\r\n### `-w, --write`\r\nModifies your files directly by removing comments and saving the changes back to the original files.\r\n\r\n**Example:**\r\n```bash\r\nnpx 00akshatsinha00decomment -w src/**/*.js\r\n```\r\n\r\n**Warning:** This permanently modifies your files. Make sure you have backups or version control in place.\r\n\r\n### `-o, --out <directory>`\r\nCreates cleaned versions of your files in a specified output directory while keeping your original files unchanged.\r\n\r\n**Example:**\r\n```bash\r\nnpx 00akshatsinha00decomment -o cleaned-code src/**/*.js\r\n```\r\n\r\nThis creates a `cleaned-code` directory with comment-free versions of your files.\r\n\r\n### No Options (Preview Mode)\r\nWhen you don't specify `-w` or `-o`, the tool displays the cleaned content in your terminal without modifying any files.\r\n\r\n**Example:**\r\n```bash\r\nnpx 00akshatsinha00decomment myfile.js\r\n```\r\n\r\n## Supported File Types\r\n\r\nThis tool works with all major programming languages and file types:\r\n\r\n- **JavaScript** (.js, .jsx)\r\n- **TypeScript** (.ts, .tsx)\r\n- **CSS** (.css, .scss, .sass, .less)\r\n- **HTML** (.html, .htm)\r\n- **JSON** (.json)\r\n- **And many more**\r\n\r\nThe tool automatically detects the file type and uses the appropriate comment removal strategy.\r\n\r\n## Examples\r\n\r\n### Clean All Files in Current Directory\r\n```bash\r\nnpx 00akshatsinha00decomment -w .\r\n```\r\n\r\n### Clean Specific File Types\r\n```bash\r\n# Only JavaScript files\r\nnpx 00akshatsinha00decomment -w \"**/*.js\"\r\n\r\n# Only CSS files\r\nnpx 00akshatsinha00decomment -w \"**/*.css\"\r\n\r\n# Multiple file types\r\nnpx 00akshatsinha00decomment -w \"**/*.{js,css,html}\"\r\n```\r\n\r\n### Clean Files in Specific Directories\r\n```bash\r\n# Clean files in src directory\r\nnpx 00akshatsinha00decomment -w \"src/**/*\"\r\n\r\n# Clean files in multiple directories\r\nnpx 00akshatsinha00decomment -w \"src/**/*\" \"lib/**/*\"\r\n```\r\n\r\n### Output to Different Directory\r\n```bash\r\n# Create cleaned versions in 'dist' folder\r\nnpx 00akshatsinha00decomment -o dist \"src/**/*.js\"\r\n```\r\n\r\n### Preview Changes First\r\n```bash\r\n# See what changes would be made without modifying files\r\nnpx 00akshatsinha00decomment \"src/myfile.js\"\r\n```\r\n\r\n## What Gets Removed\r\n\r\nThe tool removes various types of comments while preserving your code's functionality:\r\n\r\n- **Single-line comments**: `// This is a comment`\r\n- **Multi-line comments**: `/* This is a comment */`\r\n- **JSDoc comments**: `/** Documentation comment */`\r\n- **CSS comments**: `/* CSS comment */`\r\n- **HTML comments**: `<!-- HTML comment -->`\r\n\r\n## What Stays Intact\r\n\r\nYour code functionality remains completely unchanged:\r\n\r\n- All executable code\r\n- String literals (even if they contain comment-like text)\r\n- Regular expressions\r\n- Code structure and formatting\r\n- Variable names and values\r\n\r\n## Error Handling\r\n\r\nThe tool handles errors gracefully and provides helpful feedback:\r\n\r\n- **File permission errors**: Clear messages about access issues\r\n- **Invalid patterns**: Helpful suggestions for correct glob patterns\r\n- **No matching files**: Informative message when no files are found\r\n- **Processing errors**: Continues with other files if one file fails\r\n\r\n## Glob Patterns\r\n\r\nYou can use powerful glob patterns to specify which files to process:\r\n\r\n| Pattern | Description | Example |\r\n|---------|-------------|---------|\r\n| `*` | Match any file in current directory | `*.js` |\r\n| `**` | Match files in any subdirectory | `**/*.js` |\r\n| `?` | Match single character | `file?.js` |\r\n| `{a,b}` | Match either a or b | `*.{js,css}` |\r\n| `[abc]` | Match any character in brackets | `file[123].js` |\r\n\r\n## Safety Features\r\n\r\n- **Backup recommendation**: Always use version control or create backups before using `-w`\r\n- **Preview mode**: Test patterns without the `-w` flag first\r\n- **Error recovery**: Processing continues even if individual files fail\r\n- **Clear feedback**: Detailed success and error messages\r\n- **Exit codes**: Proper exit codes for scripting (0 for success, 1 for errors)\r\n\r\n## Common Use Cases\r\n\r\n### Before Code Review\r\n```bash\r\nnpx 00akshatsinha00decomment -o review-ready \"src/**/*.js\"\r\n```\r\n\r\n### Preparing Production Code\r\n```bash\r\nnpx 00akshatsinha00decomment -w \"dist/**/*.js\"\r\n```\r\n\r\n### Cleaning Legacy Code\r\n```bash\r\nnpx 00akshatsinha00decomment -w \"legacy/**/*.{js,css,html}\"\r\n```\r\n\r\n### Creating Documentation Examples\r\n```bash\r\nnpx 00akshatsinha00decomment -o examples \"src/components/*.js\"\r\n```\r\n\r\n## Troubleshooting\r\n\r\n### No Files Found\r\nIf you see \"No files found matching the specified patterns\":\r\n- Check your glob pattern syntax\r\n- Ensure the files exist in the specified locations\r\n- Try using quotes around your patterns: `\"**/*.js\"`\r\n\r\n### Permission Errors\r\nIf you encounter permission errors:\r\n- Ensure you have write access to the target files\r\n- Check if files are currently open in other applications\r\n- Run with appropriate permissions if needed\r\n\r\n### Unexpected Results\r\nIf the output isn't what you expected:\r\n- Test with preview mode first (without `-w` or `-o`)\r\n- Check that your files are in a supported format\r\n- Verify your glob patterns match the intended files\r\n\r\n### Pattern Not Working\r\nIf your glob pattern isn't matching files:\r\n- Use quotes around patterns with special characters\r\n- Test patterns with simple examples first\r\n- Remember that `**` is needed for subdirectories\r\n\r\n## Requirements\r\n\r\n- **Node.js**: Version 14.0.0 or higher\r\n- **Operating Systems**: Windows, macOS, Linux\r\n\r\n## License\r\n\r\nISC License - see LICENSE file for details.\r\n\r\n## Support\r\n\r\nIf you encounter issues or have questions:\r\n1. Check the troubleshooting section above\r\n2. Verify your Node.js version meets requirements\r\n3. Test with simple examples first\r\n4. Ensure your glob patterns are correct\r\n\r\n## Version History\r\n\r\n- **1.0.0**: Initial release with core functionality\r\n","readmeFilename":"README.md"}