npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@acoustic-content-sdk/schematics-feature-module

v9.0.10076

Published

Schematic to add a feature module to an application.

Downloads

64

Readme

npm

Schematic to add a feature module to an application.

Usage

The package addresses the following usecaes

Implement the ng-add schematics for feature modules

The modules exposes the addFeatureModuleToApplication schematic that can be used as a general purpose implementation of the ng-add schematic. The implementation will add the ngModule of a feature module to the main application.

Use the following ng-generate schematic to add ng-add support to your feature module.

Add support for the ng-add schematics to a feature module

For a feature module add the following command to add support for the ng-add schematic:

ng generate @acoustic-content-sdk/schematics-feature-module.schematics --module MODULE_NAME

Where MODULE_NAME is the name of the module you'd like to have added.

The result of this command is the registration of an ng-add for the module, so the module can be added to another application via:

ng add YOUR_NPM_PACKAGE_NAME

Advanced Usecase

In case your module requires the inclusion of top level modules from external libraries you can add these modules using the syntax importPath#moduleName where the import path points to the external module. Make sure to also add the imported module to the peerDependencies of your module.

Example:

If your module contains animations you might want to add the BrowserAnimationsModule module to the app, using this specifier: @angular/platform-browser/animations#BrowserAnimationsModule.

Documentation

API Documentation

Home > @acoustic-content-sdk/schematics-feature-module

schematics-feature-module package

Schematic to add a feature module to an application.

Functions

| Function | Description | | --- | --- | | addFeatureModuleToApplication(options) | Adds a feature module to an application. The feature module is defined as part of the input options. The schematics fill locate the correct application module and then imports the feature module into the application module.The command is modeled such that it can be referenced from a feature module without any additional coding involved. | | generateFeatureModuleSchematic(options) | Adds a feature module to an application. The feature module is defined as part of the input options. The schematics fill locate the correct application module and then imports the feature module into the application module.The command is modeled such that it can be referenced from a feature module without any additional coding involved. |

Interfaces

| Interface | Description | | --- | --- | | AddFeatureModuleToApplicationSchema | Definition of the input parameters for the schematic | | GenerateFeatureModuleSchema | |

Variables

| Variable | Description | | --- | --- | | VERSION | Version and build number of the package |

Home > @acoustic-content-sdk/schematics-feature-module > addFeatureModuleToApplication

addFeatureModuleToApplication() function

Adds a feature module to an application. The feature module is defined as part of the input options. The schematics fill locate the correct application module and then imports the feature module into the application module.

The command is modeled such that it can be referenced from a feature module without any additional coding involved.

Signature:

export declare function addFeatureModuleToApplication(options: AddFeatureModuleToApplicationSchema): Rule;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | options | AddFeatureModuleToApplicationSchema | the schematics object used to describe the feature module |

Returns:

Rule

the schematics rule that executes the transform

Home > @acoustic-content-sdk/schematics-feature-module > generateFeatureModuleSchematic

generateFeatureModuleSchematic() function

Adds a feature module to an application. The feature module is defined as part of the input options. The schematics fill locate the correct application module and then imports the feature module into the application module.

The command is modeled such that it can be referenced from a feature module without any additional coding involved.

Signature:

export declare function generateFeatureModuleSchematic(options: GenerateFeatureModuleSchema): Rule;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | options | GenerateFeatureModuleSchema | the schematics object used to describe the feature module |

Returns:

Rule

the schematics rule that executes the transform

Home > @acoustic-content-sdk/schematics-feature-module > AddFeatureModuleToApplicationSchema

AddFeatureModuleToApplicationSchema interface

Definition of the input parameters for the schematic

Signature:

export interface AddFeatureModuleToApplicationSchema 

Properties

| Property | Type | Description | | --- | --- | --- | | importPath | string | Optionally the import path of the module. If missing defaults to the project running the initial schematic. | | module | string | Name of the module, may be a comma separated list. Module identifiers have the following syntax: [path#]name[.forRoot()]. If path is missing it falls back to the import path given by this schema (or its default). | | project | string | The project name, falls back to the default project |

Home > @acoustic-content-sdk/schematics-feature-module > GenerateFeatureModuleSchema

GenerateFeatureModuleSchema interface

Signature:

export interface GenerateFeatureModuleSchema 

Properties

| Property | Type | Description | | --- | --- | --- | | module | string | Name of the module, may be a comma separated list | | project | string | The project name, falls back to the default project |

Home > @acoustic-content-sdk/schematics-feature-module > VERSION

VERSION variable

Version and build number of the package

Signature:

VERSION: {
    version: {
        major: string;
        minor: string;
        patch: string;
        branch: string;
    };
    build: Date;
}

Home > @acoustic-content-sdk/schematics-feature-module > AddFeatureModuleToApplicationSchema > importPath

AddFeatureModuleToApplicationSchema.importPath property

Optionally the import path of the module. If missing defaults to the project running the initial schematic.

Signature:

importPath?: string;

Home > @acoustic-content-sdk/schematics-feature-module > AddFeatureModuleToApplicationSchema > module

AddFeatureModuleToApplicationSchema.module property

Name of the module, may be a comma separated list. Module identifiers have the following syntax: [path#]name[.forRoot()]. If path is missing it falls back to the import path given by this schema (or its default).

Signature:

module: string;

Home > @acoustic-content-sdk/schematics-feature-module > AddFeatureModuleToApplicationSchema > project

AddFeatureModuleToApplicationSchema.project property

The project name, falls back to the default project

Signature:

project?: string;

Home > @acoustic-content-sdk/schematics-feature-module > GenerateFeatureModuleSchema > module

GenerateFeatureModuleSchema.module property

Name of the module, may be a comma separated list

Signature:

module: string;

Home > @acoustic-content-sdk/schematics-feature-module > GenerateFeatureModuleSchema > project

GenerateFeatureModuleSchema.project property

The project name, falls back to the default project

Signature:

project?: string;