Skip to content

This repository contains PowerShell and Bash scripts to rename an Angular project folder and update relevant files, such as angular.json, package.json, tsconfig.json, and other configuration files.

Notifications You must be signed in to change notification settings

Khumozin/ngx-rename

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Rename Angular Project Scripts

This repository contains PowerShell and Bash scripts to rename an Angular project folder and update relevant files, such as angular.json, package.json, tsconfig.json, and other configuration files.

Features

  • Rename the project folder.
  • Update all occurrences of the old project name in:
    • angular.json
    • package.json
    • tsconfig.json
    • styles.scss
    • karma.conf.js (and other JavaScript files as needed).
  • Supports both Windows and Unix-like systems.

Scripts

PowerShell Script: ngx-rename.ps1

Designed for Windows users, this script allows you to rename an Angular project.

Usage

  1. Open PowerShell.
  2. Run the script:
    .\ngx-rename.ps1
  3. Follow the prompts to enter:
    • Current project name.
    • New project name.

Bash Script: ngx-rename.sh

Designed for Linux and macOS users, this script provides similar functionality.

Usage

  1. Make the script executable:
    chmod +x ngx-rename.sh
  2. Run the script:
    ./ngx-rename.sh
  3. Follow the prompts to enter:
    • Current project name.
    • New project name.

Requirements

PowerShell Script

* Compatible with PowerShell Core and Windows PowerShell.
* No external dependencies.

Bash Script

  • Requires jq for JSON manipulation. Install using:
    sudo apt-get install jq  # For Debian/Ubuntu
    brew install jq          # For macOS

Example

  • Rename my-angular-app to new-angular-app: The folder my-angular-app is renamed to new-angular-app. All occurrences of my-angular-app in the listed files are updated to new-angular-app.

Notes

  • Ensure you back up your project before running the script.
  • Test the script on a copy of your project if you're unsure.

Contributing

Feel free to submit pull requests or report issues if you encounter bugs or have suggestions.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

This repository contains PowerShell and Bash scripts to rename an Angular project folder and update relevant files, such as angular.json, package.json, tsconfig.json, and other configuration files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published