$ show nxext/nx-extensions
This repository is a collection of Nx plugins for integrating various frontend frameworks (Svelte, Solid, Preact, Ionic/Angular, Ionic/React, Stencil, Capacitor, SvelteKit) with Nx workspaces. It provides generators for scaffolding framework-specific projects and components, and executors for running framework-specific build, test, and serve commands within Nx. The architecture follows a monorepo structure with framework-specific packages under `packages/` and a shared `@nxext/common` package containing reusable utilities for Vite integration, dependency management, and workspace modifications. Each plugin adheres to Nx's plugin architecture with clear separation between generators (code generation) and executors (task execution). The project demonstrates strong maintenance practices with version synchronization scripts, comprehensive testing (unit and E2E), and documentation generation tools.
The LLM identified 5 files worth highlighting for reuse:
Core Vite integration utility that handles framework-agnostic Vite configuration setup. It detects existing Vite configurations, merges with framework-specific settings, and installs necessary dependencies. This pattern is reused across multiple framework plugins (Svelte, Solid, etc.) with minimal adaptation, demonstrating encapsulation of a complex integration concern.
Standardized ESLint configuration setup that works with both legacy (.eslintrc.json) and flat config (.eslintrc.mjs) formats. It handles framework-specific rule extensions and plugin installations. This utility is imported by multiple framework plugins, showing effective abstraction of a common developer tooling concern.
Jest testing framework integration that configures test environments, sets up coverage reporting, and installs framework-specific presets. It handles both traditional and ESM module configurations. This pattern appears in multiple framework plugins, demonstrating consistent testing setup abstraction.
Collection of AST manipulation utilities for safely modifying TypeScript files. Includes functions for adding/removing imports, modifying class/method declarations, and updating object literals. These low-level utilities are used across generators for framework-specific code modifications, showing encapsulation of complex AST operations.
Utility for safely modifying nx.json to register new plugins. Handles edge cases like missing plugin arrays, duplicate entries, and maintains proper JSON formatting. This solves a common plugin integration problem with minimal coupling to framework-specific concerns.