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.
- 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.
Designed for Windows users, this script allows you to rename an Angular project.
- Open PowerShell.
- Run the script:
.\ngx-rename.ps1
- Follow the prompts to enter:
- Current project name.
- New project name.
Designed for Linux and macOS users, this script provides similar functionality.
- Make the script executable:
chmod +x ngx-rename.sh
- Run the script:
./ngx-rename.sh
- Follow the prompts to enter:
- Current project name.
- New project name.
* Compatible with PowerShell Core and Windows PowerShell.
* No external dependencies.
- Requires jq for JSON manipulation. Install using:
sudo apt-get install jq # For Debian/Ubuntu brew install jq # For macOS
- Rename
my-angular-app
tonew-angular-app
: The foldermy-angular-app
is renamed tonew-angular-app
. All occurrences ofmy-angular-app
in the listed files are updated tonew-angular-app
.
- Ensure you back up your project before running the script.
- Test the script on a copy of your project if you're unsure.
Feel free to submit pull requests or report issues if you encounter bugs or have suggestions.
This project is licensed under the MIT License
. See the LICENSE file for details.