Angular Modernizer
    Preparing search index...

    Standalone Migration Plugin

    Migrates Angular applications to the standalone architecture introduced in Angular 14. It implements the Plugin interface and is the entry point the Kernel loads.

    The plugin currently provides one transformation rule:

    The plugin follows the "Plugin as Container" pattern:

    The plugin is typically loaded by the Kernel during initialization:

    // In the Kernel or a plugin loader
    const plugin = new StandalonePlugin();
    await plugin.initialize(kernel);

    const transformRules = plugin.getTransformRules();
    // Use the rules to transform files

    Implements

    Index

    Constructors

    Properties

    author: "Angular Modernization Platform" = 'Angular Modernization Platform'

    Plugin author.

    description: "Provides standalone migration capabilities for Angular components, directives, and pipes" = 'Provides standalone migration capabilities for Angular components, directives, and pipes'

    Plugin description.

    name: "@angular-modernizer/plugin-standalone" = '@angular-modernizer/plugin-standalone'

    Unique plugin identifier.

    version: "0.1.0" = '0.1.0'

    Plugin version reported to the kernel.

    Methods

    • Get all analysis rules provided by this plugin.

      Returns AnalysisRule[]

      Empty array (no analysis rules yet)

      Analysis rules examine code and report violations/insights. This plugin currently provides no analysis rules, but future versions will include rules to detect non-standalone components.

    • Get all transformation rules provided by this plugin.

      Returns TransformRule[]

      Array containing the standalone migration rule

      Transformation rules modify code to fix violations or modernize patterns. This plugin provides the StandaloneMigrationRule which migrates Angular artifacts to standalone architecture.

    • Get all validation rules provided by this plugin.

      Returns ValidationRule[]

      Empty array (no validation rules yet)

      Validation rules verify that transformations were successful. This plugin currently provides no validation rules, but future versions will include rules to verify standalone migrations.

    • Initialize the plugin.

      Parameters

      • _kernel: IKernel

        The Kernel instance for accessing infrastructure

      Returns Promise<void>

      Promise that resolves when initialization is complete

      Called once during Kernel initialization. This plugin currently has no initialization requirements, but the method is provided for future extensions (e.g., loading configuration, registering services, etc.).