Skip to content

spfx project rename

Renames SharePoint Framework project

Usage

spfx project rename [options]

Options

Option Description
--help output usage information
-n, --newName <newName> New name for the project
--generateNewId Generate a new solution ID for the project
--query [query] JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output] Output type. json|text|md. Default text
--pretty Prettifies json output
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Important

Run this command in the folder where the project that you want to rename is located.

Remarks

This command will update the project name in: package.json, .yo-rc.json, package-solution.json, deploy-azure-storage.json and README.md.

Examples

Renames SharePoint Framework project to contoso

spfx project rename --newName contoso

Renames SharePoint Framework project to contoso with new solution ID

spfx project rename --newName contoso --generateNewId