Update a Project
Use the update project function to update various project configuration settings from the command line.
NOTE: Refer to the individual How Do I? tasks for more information on the update project arguments that can be passed for those tasks.
- Go to the command prompt or terminal of your template project.
- Execute ch5-shell-cli update:project [options] or npm run update:project -- --[options], where [options] is the argument(s) that must be passed for particular tasks. The update:project NPM one-click script can also be selected from within Visual Studio Code as shown below.
NOTE: To access help for the update project function, including all current commands and arguments, execute npm run update:project –- --help.
Note the following when using the update project function:
- All arguments (projectName, menuOrientation, and so forth) are the same as those defined in the project-config.json file. The only exception is "version", which must be updated by issuing ch5-shell-cli update:project --projectVersion [version].
- Page and widget components can be added using a custom configuration JSON file.
- If there are newer page or widget components in the configuration file (that do not exist in the project), then the new components will be added to the project.
- If the configuration file does not contain the page or widget components defined in the project, then these components will be deleted and cannot be restored. The values in the configuration file will override the project-config.json file in the project.
- If updates are made in a custom configuration JSON file, a confirmation will be requested by the script for updating the project. Issue --force to override the confirmation. If a configuration file is added as an argument along with other parameters to the update:project command, then the configuration file takes precedence, and other parameters are ignored.