Upgrade existing project
Last updated
Last updated
First, make sure you have committed everything or have a backup of your existing project.
â RECOMANDATION! â
To avoind having lots of differences, make sure you have Prettier formatter installed in your project.
OR
Also a file named .prettierrc containing the desired formatting settings is placed in the root of the project. See Code formatting section to see the generator's default config file.
Then apply your formatting rules to the existing files by executing:
To upgrade an existing project that was scaffold using this generator open a console outside of your project folder ( see image below ) and run:
When prompted to enter the name of your project make sure you enter the name of the project you want to upgrade ( like shown in the above image ). If you enter a new name, it will generate a new project.
Web App Rocket Generator stores your configuration answers in a .yo-rc.json
file, located in the root
of your project. It also stores the name of the generator used and the timestamp of the last run.
When upgrading an existing project, the generator asks if you wish to use these stored values so you can skip answering again all the questions (see bellow).
If you choose not to use the stored configuration options, you will be asked to answer the same questions explained in Generate new project section.
Mainly you have to choose all the options already included in your existing project, or you can add new ones.
If you decide not to include an option that was previously installed on your existing project (e.g. Authorization), Yeoman will not remove files or folders by its own, he just merges existing files or created new ones, and you would have to manually delete the unnecessary files or folders. (In the future, the generator will handle the deletion of the unnecessary files)
After answering all the questions, Yeoman will force merge all the project files with the incoming changes, if any.
It's up to you to check all the changes before committing them.