Skip to content
Boris Penkov edited this page Dec 14, 2023 · 17 revisions

ig new

Overview

ig new [name] creates a new Ignite UI application.

Using the new command, you can create a new jQuery, Angular or React application. The application will be configured to use either Ignite UI for JavaScript, Ignite UI for React or Ignite UI for Angular controls. The new application is created in a directory of the same name. Keep in mind that creating a new application inside an existing application is not supported.

Arguments

name

name (alias: -n)

The name of the application. The application is created inside a directory with the same name.

framework

--framework (alias: -f) default value: "jquery"

Framework to setup project for. The supported frameworks are jQuery, Angular and React.

type

--type (alias: -t)

The available project types depend on the selected framework. Currently, when creating an Angular project, you can select between `ig-ts` and `igx-ts` types (the latter for applications that are configured to use Ignite UI for Angular). jQuery and React projects support a single type only - `js` for jQuery and `es6` for React. As those are default project types, you do not need to provide `--type` argument when creating jQuery or React projects.

theme

--theme (alias: -th)

Project theme (depends on project type).

skip-git

--skip-git (alias: --sg)

When this option is used, the automatic repository initialization with Git will be skipped. If the option is omitted, then the global skipGit configuration property is used.

skip-install (v4.0.0)

--skip-install (alias: --si)

Since v4.0.0 the ig new command will install package dependencies when the project is created. Passing this flag will skip the initial installation.

template (v3.0.0)

--template

Use this option if there are different project templates for a specific framework type. Currently this option is available only for Ignite UI for Angular igx-ts and Ignite UI for Web Components project types. The possible values are as it follows:

template id template description
empty Project structure with routing and a home page
side-nav Project structure with side navigation drawer
side-nav-auth Side navigation project extended with user authentication module (currently only available for Ignite UI for Angular)

Creating Ignite UI for JavaScript applications

To create an application that is configured to use the Ignite UI for JavaScript controls, you need to provide the desired framework you want to work with as an argument. Following are examples of how to use the new command to create an Ignite UI for JavaScript applications in all supported frameworks:

Framework Command
jQuery ig new newIgniteUIjQuery
jQuery is the default choice so you do not need to provide the "framework" argument.
React Wrappers ig new newIgniteUIReact --framework=react
Using aliases: ig new newIgniteUIReact -f=react
Angular Wrappers ig new newIgniteUIAngular --framework=angular --type=ig-ts
Using aliases: ig new newIgniteUIAngular -f=angular -t=ig-ts
Web Components ig new newIgniteUIWebComponents --framework=webcomponents
Using aliases: ig new newIgniteUIWebComponents -f=webcomponents

Creating Ignite UI for React applications (v4.0.0)

To create an application that is configured to use the Ignite UI for React controls, you need to provide the desired framework (--framework=react) you want, as well as the type of the project (--type=igr-es6). The following is an examples of how to use the new command to create an Ignite UI for React application:

Framework Command
React ig new newIgniteUIReact --framework=react --type=igr-es6
To create a project using React components, be sure to type --type=igr-es6. Omitting this will create a project that uses the IgniteUI for Javascript React Wrappers.

Creating Ignite UI for Angular applications

To create an application that is configured to use the Ignite UI for Angular controls, you need to provide "igx-ts" as your project type argument.

Framework Command
Angular ig new newIgniteUIAngular --framework=angular --type=igx-ts --template=side-nav
Using aliases: ig new newIgniteUIAngular -f=angular -t=igx-ts --template=side-nav

Note

After v13.1.0 the new command will generate Angular applications with standalone components by default. Legacy (NgModule based) applications are still supported by providing the --type=igx-ts-legacy flag.

Creating Ignite UI for Web Components applications

To create an application that is configured to use the Ignite UI for Web Components controls, you need to you need to execute the following command:

Framework Command
Web Components ig new newIgniteUIWebComponents --framework=webcomponents
Using aliases: ig new newIgniteUIAngular -f=webcomponents