chore(CLI Tool): #3591632 Change default global CSS path in CLI and Workbench config

  • Change default globalCssPath to src/global.css
  • Normalize path definitions in all canvas.config.json shapes, e.g.: ./src/[...]src/[...]
  • Add backwards compatibility and warning for codebases keeping CSS at src/components/global.css with no globalCssPath in canvas.config.json.

Testing steps

  1. Put global CSS in the new default location: src/global.css

  2. Run Workbench and a Canvas CLI command, for example:

npx canvas-workbench
npx canvas validate
  1. Check that:

    • Both commands work normally.
    • No warning appears.
    • Global styles appear in Workbench previews.
  2. Move the file to the old location:

    src/components/global.css

    And remove:

    src/global.css

  3. Run Workbench and the Canvas CLI command again.

  4. Check that:

    • Both commands still work.
    • A warning appears about the old global CSS location.
    • Global styles still appear in Workbench previews.
  5. Add this to canvas.config.json:

      {
        "globalCssPath": "src/components/global.css"
      }
  6. Run Workbench and the CLI command again.

  7. 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

Merge request reports

Loading