Upgrade an app to tokens v2
Paths are relative to your Fresh app, such as apps/dashboard/. For the current theme chain,
presets, and semantic overrides, see Theme your app.
Older apps keep working. [data-theme='dark'] and [data-theme='light'] still resolve NS One, and
every earlier --ns-* property remains. To adopt the new attributes:
- Move hand edits in
assets/tokens.cssinto the override file where the alias layer can hold them. Applying a preset replaces the generated files. - Run
netscript ui:apply --preset ns-oneto generatetheme-preset.jsonandfonts.jsonfor the earlier look. - Update
routes/_app.tsxandlib/theme.tsto match a new scaffold: stampdata-theme,data-density, anddata-flavoron<html>, link the fonts, and make the preference script setdata-scheme, keeping thens-themekey. UpdateThemeToggleand the lightcolor-schemeselector the same way. - Run
netscript ui:updateto merge registry copies. It lists files you edited for a manual merge. - Switch presets with
netscript ui:apply --preset studio-utility.
Component copies from 0.0.8 also need netscript ui:migrate variants. Preview it with --dry-run.