Proposal for single-spa CLI Introduction
Summary
This proposal advocates for the introduction of a single-spa Command Line Interface (CLI) to streamline the project setup and configuration process within the single-spa ecosystem. Currently, create-single-spa serves as the primary utility for initializing single-spa projects. The new CLI aims to not only replace create-single-spa but also provide a unified and simplified interface for creating, developing, and building single-spa projects. It seeks to address the challenge of default exposure of not just webpack configuration but also other infrastructure settings such as Babel config to all users, regardless of their need for customization.
Problem
The current state of tooling in the single-spa ecosystem presents several challenges:
- Overexposure of Configuration: The default setup exposes webpack, Babel, and other infrastructure configurations to all users. This broad exposure can overwhelm those who do not require direct access or customization, leading to a steeper learning curve and potential misconfigurations.
- Lack of a Unified Tooling Experience: With the existing
create-single-spa utility focusing primarily on project initialization, there is a noticeable absence of a comprehensive tool that encompasses a broader range of development activities. A unified CLI could significantly enhance the developer experience by streamlining project creation, development, and build processes.
- Increased Risk of Configuration Drift: The direct exposure of critical configurations such as webpack and Babel across different development environments and projects can lead to configuration drift. This drift complicates maintenance and standardization efforts, hindering collaboration and project scalability.
Solution
The proposed single-spa CLI is designed to tackle these issues effectively:
- Unified CLI Interface: Replacing
create-single-spa, the new CLI will offer an integrated solution for project management, including creation, development, and build processes. This unified approach aims to simplify the development workflow, making the single-spa ecosystem more approachable and user-friendly.
- Selective Configuration Exposure: The CLI will adopt a more selective approach to exposing configurations, hiding complex setup details like webpack and Babel configurations by default. This method ensures that such configurations are only made available to developers who explicitly require them, thus reducing the initial complexity for newcomers.
- Advanced Customization Without Overwhelm: Introducing a customization mechanism for webpack and Babel configurations (among others) that mirrors the approach used by NestJS. This method will allow developers to adjust the default setup through specific functions without the need to sift through the entire configuration. It will enable the inclusion of necessary modifications and plugins, catering to the needs of advanced users without cluttering the experience for those seeking simplicity.
By addressing these challenges, the proposed single-spa CLI aims to enhance the overall development experience within the single-spa ecosystem, offering a balance between simplicity for beginners and powerful customization options for experienced developers.
Proposal for single-spa CLI Introduction
Summary
This proposal advocates for the introduction of a
single-spaCommand Line Interface (CLI) to streamline the project setup and configuration process within the single-spa ecosystem. Currently,create-single-spaserves as the primary utility for initializing single-spa projects. The new CLI aims to not only replacecreate-single-spabut also provide a unified and simplified interface for creating, developing, and building single-spa projects. It seeks to address the challenge of default exposure of not just webpack configuration but also other infrastructure settings such as Babel config to all users, regardless of their need for customization.Problem
The current state of tooling in the single-spa ecosystem presents several challenges:
create-single-spautility focusing primarily on project initialization, there is a noticeable absence of a comprehensive tool that encompasses a broader range of development activities. A unified CLI could significantly enhance the developer experience by streamlining project creation, development, and build processes.Solution
The proposed
single-spaCLI is designed to tackle these issues effectively:create-single-spa, the new CLI will offer an integrated solution for project management, including creation, development, and build processes. This unified approach aims to simplify the development workflow, making the single-spa ecosystem more approachable and user-friendly.By addressing these challenges, the proposed
single-spaCLI aims to enhance the overall development experience within the single-spa ecosystem, offering a balance between simplicity for beginners and powerful customization options for experienced developers.