Skip to content

[Feature]: canvas:a2ui:bundle script is not Windows compatible - should use Node.js instead of bash #10070

@JAVA-LW

Description

@JAVA-LW

Summary

The canvas:a2ui:bundle script currently uses bash scripts/bundle-a2ui.sh command, which is not friendly for Windows development environments and prevents successful builds on Windows. This limits the project's cross-platform development capabilities.

Proposed solution

Migrate the canvas:a2ui:bundle script from a bash script to a Node.js script, enabling it to run on all platforms (including Windows, macOS, and Linux).

Specific change:

"canvas:a2ui:bundle": "node --import tsx scripts/bundle-a2ui.ts",

This would require creating a TypeScript/JavaScript version of bundle-a2ui.ts to replace the existing bash script.

Alternatives considered

  1. Use cross-platform shell scripting tools: Such as PowerShell scripts or configuring WSL (Windows Subsystem for Linux), but this would increase development environment configuration complexity.
  2. Maintain the current approach: But this excludes Windows developers and limits the project's contributor pool.
  3. Use third-party build tools: Such as using Rollup or ESBuild APIs, but this might add unnecessary dependencies and complexity.

Additional context

  • Currently running pnpm build on Windows fails because bash scripts cannot be executed directly in Windows Command Prompt or PowerShell.
  • The project already extensively uses Node.js scripts (e.g., scripts/ui.js, scripts/protocol-gen.ts), indicating that Node.js scripts are the preferred cross-platform solution for the project.
  • Migrating to a Node.js script will ensure all developers can build the project regardless of their operating system, improving the project's accessibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions