Skip to content
GitSiteEmail

Updating components

Every GamefaceUI component carries its own version, independent of the library’s. A fix to Slider bumps Slider, and nothing else moves. That means you can pick up an improvement to one component without pulling in unrelated changes across your whole UI.

The Gameface CLI tracks what you have installed in your package.json, under gameface-ui-components:

"gameface-ui-components": {
"Dropdown": "1.0.0",
"Slider": "1.2.0"
}

Updating is the difference between that record and the versions the library currently publishes.

The usual command. Run it from the root of your project:

Terminal window
npx gameface-cli update

This looks at every component you have installed, works out which ones are behind, and brings them all up to date in a single pass. Shared dependencies are fetched once no matter how many components need them, so updating twenty components is not twenty downloads.

If you would rather move one component at a time:

Terminal window
npx gameface-cli update Dropdown

If that component is already current, the CLI tells you so and does nothing.

What updating changes, and what it leaves alone

Section titled “What updating changes, and what it leaves alone”

update only ever touches components it installed for you. Everything else in your project is yours.

FilesUpdated?
Components and the tools they ownYes, this is what the command is for
Your views, and anything in src/custom-componentsNever touched
Config files: tsconfig, Vite config, package.json, ESLintNever rewritten

Build and config files are deliberately excluded. They are the files you are meant to edit, so overwriting them would throw away your work. When a library release does need a configuration change, it is described in the changelog for that version and applied by hand.

update refreshes what you already have. It never installs something new. When the library ships a component you do not have yet, add it explicitly:

Terminal window
npx gameface-cli add RadialMenu

To see what is available, including anything added since you last looked:

Terminal window
npx gameface-cli list

Installed components are marked, so whatever is unmarked is new to your project.

The library has a version of its own, separate from any individual component’s. It tells you which release your components are being fetched from, and it is the version whose changelog is worth reading when it moves, since a library release may carry migration notes that no command can apply for you.

Component versions answer a narrower question: has this particular component changed since I installed it? That is the question update acts on.