chore(CLI Tool): #3591632 Change default global CSS path in CLI and Workbench config
- Change default
globalCssPathtosrc/global.css - Normalize path definitions in all
canvas.config.jsonshapes, e.g.:./src/[...]→src/[...] - Add backwards compatibility and warning for codebases keeping CSS at
src/components/global.csswith noglobalCssPathincanvas.config.json.
Testing steps
-
Put global CSS in the new default location:
src/global.css -
Run Workbench and a Canvas CLI command, for example:
npx canvas-workbench
npx canvas validate-
Check that:
- Both commands work normally.
- No warning appears.
- Global styles appear in Workbench previews.
-
Move the file to the old location:
src/components/global.cssAnd remove:
src/global.css -
Run Workbench and the Canvas CLI command again.
-
Check that:
- Both commands still work.
- A warning appears about the old global CSS location.
- Global styles still appear in Workbench previews.
-
Add this to canvas.config.json:
{ "globalCssPath": "src/components/global.css" } -
Run Workbench and the CLI command again.
-
Check that:
- Both commands still use the old location.
- The warning no longer appears.
Closes #3591632 (closed). Authored with an AI coding agent.
Edited by Bálint Kléri