npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

angular-v20-bulk-file-refactor

v1.0.12

Published

A CLI tool to automate file renaming and TypeScript refactoring for Angular 20 projects, aligning with conventions for components, services, directives, models, and standalone components.

Readme

Angular v20 Bulk File Refactor

A CLI tool to automate file renaming and content refactoring for Angular 20 projects. This tool updates file names and TypeScript file contents to align with Angular 20 conventions, handling patterns like .component, .service, .directive, and .model.


⚠️ Important Note

The project path you provide must include /src/app

If you omit /src/app, the tool will not work and will throw an error.

Example:
npx angular-v20-bulk-file-refactor /path/to/angular/project/src/app
npx angular-v20-bulk-file-refactor /path/to/angular/project


Installation

Global Installation

Install the tool globally to use it from any directory:

npm install -g angular-v20-bulk-file-refactor

Run the tool directly:

angular-v20-bulk-file-refactor /path/to/your/angular/project/src/app

Local Installation

Install the tool locally within a project:

npm install angular-v20-bulk-file-refactor

Run the tool using npx:

npx angular-v20-bulk-file-refactor /path/to/your/angular/project/src/app

Alternatively, add a script to your package.json:

{
  "scripts": {
    "refactor": "angular-v20-bulk-file-refactor"
  }
}

Then run:

npm run refactor -- /path/to/your/angular/project/src/app

Usage

Run the tool on your Angular project by specifying the project folder path. Use the global command or npx depending on your installation method.

Options

  • --skip-dirs <dirs>: Comma-separated list of directories to skip during processing.
    Default: models,partials
    Example: --skip-dirs models,tests skips the models and tests directories.

  • --replace-file-name-segments <segments>: Comma-separated list of file name segments to replace with a hyphenated version (e.g., .service becomes -service in the services folder).
    Default: services,directives
    Example: --replace-file-name-segments services,pipes replaces .service with -service in the services folder.

  • --remove-file-name-segments <segments>: Comma-separated list of file name segments to remove (e.g., .model is removed from file names in the models folder).
    Default: models
    Example: --remove-file-name-segments models,utils removes .model from file names in the models folder.

  • --replace-import-segments <segments>: Comma-separated list of import segments to replace (e.g., .service becomes -service in import statements).
    Default: .service
    Example: --replace-import-segments .service replaces .service with -service in imports.

  • --remove-import-segments <segments>: Comma-separated list of import segments to remove from import statements.
    Default: .component,.directive,.model
    Example: --remove-import-segments .component,.directive removes these segments from imports.

Example

Run the tool on a specific Angular project folder with custom options:

# Global installation
angular-v20-bulk-file-refactor D:\\Multignite\\Programming\\My-Projects\\angular-app\\src\\app --skip-dirs models,tests --replace-file-name-segments services,pipes --remove-file-name-segments models,utils

# Local installation with default options
npx angular-v20-bulk-file-refactor D:\\Multignite\\Programming\\My-Projects\\angular-app\\src\\app --skip-dirs models,partials --replace-file-name-segments services,directives --remove-file-name-segments models --replace-import-segments .service --remove-import-segments .component,.directive,.model

# Local installation with custom options
npx angular-v20-bulk-file-refactor D:\\Multignite\\Programming\\My-Projects\\angular-app\\src\\app --skip-dirs models,tests --replace-file-name-segments services,pipes --remove-file-name-segments models,utils

# Using package.json script
npm run refactor -- D:\\Multignite\\Programming\\My-Projects\\angular-app\\src\\app --skip-dirs models,tests --replace-file-name-segments services,pipes --remove-file-name-segments models,utils

Compatibility

This tool has been tested on Windows and works reliably. A Linux binary is included but hasn’t been fully tested yet. I’d love to hear how it performs on Linux or macOS! Please share your experience or report issues at github.com/multignite/angular-v20-bulk-file-refactor/issues.

License

MIT License. See LICENSE for details.

Author

Multignite multignite

Repository

github.com/multignite/angular-v20-bulk-file-refactor

Issues

Report bugs or suggest improvements at github.com/multignite/angular-v20-bulk-file-refactor/issues.

Security Measures

This package includes several security features to protect users:

  • SHA-256 Verification: Each binary comes with a .sha256 file containing a unique fingerprint that verifies the file hasn't been tampered with during download.
  • GPG Signatures: All binaries include .asc signature files that prove the software was created by the package author and not modified by third parties.
  • Automated Builds: All binaries are built using GitHub Actions automated workflows, ensuring consistent and reproducible builds without manual intervention.

Read more at keys/README.md