Ignite UI CLI for Web Components

    Our CLI tools provide project templates pre-configured for the Ignite UI for Web Components toolset that help you get your next application off the ground in record time. The Ignite UI CLI is a stand-alone command-line tool for creating and scaffolding your applications for a variety of different frameworks and provides a substantial productivity boost for developers.

    Getting Started

    To get started, install the CLI:

    npm install -g igniteui-cli
    

    The above install command will make the Ignite UI CLI available for creation, scaffolding, and running of your Ignite UI for Web Components application.

    Create a New Project

    To create an application that is configured to use the Ignite UI for Web Components controls using the Ignite UI CLI, you can use the following template in your command line:

    ig new "[name_of_project]" --framework=[target_framework]
    

    Using the above template, if you wanted to create a Web Components application named "My Project" you could write the following command:

    ig new "My Project" --framework=webcomponents
    

    Adding Components

    Once you have created a project, you can then add additional component templates using ig add at any point. Running this command without any parameters will guide you through the available templates by using a keyboard navigation CLI to add the control of your choosing.

    ig add
    

    Alternatively, you can simply run the ig list command to get a full list of supported templates in the current project you have created.

    ig list
    

    After running ig list and you find the component template you would like to add, you can do so quickly by following this template in your command line:

    ig add [component_template] [component_name]
    

    The "component_template" above will generally match an Ignite UI for Web Components component ("grid", "category-chart", "linear-gauge", etc.).

    For example, if you wanted to add a data grid templated component named "MyGridComponent" to your application, you could run the following:

    ig add grid MyGridComponent
    

    Currently the CLI can be used with the following Web Components:

    Name Component Template
    Avatar avatar
    Card card
    Badge badge
    Button button
    Checkbox checkbox
    Form form
    Icon icon
    Icon Button icon-button
    Input input
    Radio Group radio-group
    Switch switch
    Calendar calendar
    List list
    Navbar navbar
    Ripple ripple
    Pie Chart pie-chart
    Dock Manager dock-manager

    Build and Run the Application

    In order to build and run the Ignite UI for Web Components application, you can call the ig build and ig run commands:

    ig build
    ig run
    

    Ignite UI CLI Commands

    A full list of the available Ignite UI CLI commands and their usage (like passing flags, etc.), can be found at the Ignite UI CLI wiki pages:

    Command Alias Description
    ig start Builds the application, starts a web server and opens the application in the default browser.
    ig build Builds the application into an output directory
    ig generate g Generates a new custom template for supported frameworks and project types
    ig help -h Lists the available commands and provides a brief description of what they do.
    ig config Performs read and write operation on the Ignite UI CLI configuration settings.
    ig doc Searches the Infragistics knowledge base for information about a given search term
    ig list l Lists all templates for the specified framework and type. When you run the command within a project folder it will list all templates for the project's framework and type, even if you provide different ones.
    ig test Executes the tests for the current project.
    ig version -v Shows Ignite UI CLI version installed locally, or globally if local is missing