# Building with npm

Follow this guide to build the repository with npm to run the apps in the local environment.

## Initialize the development target

Run the following [Ant 🐜](https://ant.apache.org/) commands from the root of the repository i.e where the root `pom.xml` is located.

### `build-pack`


> **Note**
> Downloads the relevant [identity-apps](https://github.com/wso2/identity-apps) tag defined in the `pom.xml` and sets up the target.

```shell
mvn antrun:run@build-pack
```

### `init-extensions`

> **Note**
> Patches the webapps and other components with the extensions.

```shell
mvn antrun:run@init-extensions
```

## Install cloud only dependencies.

Navigate to the `target/identity-apps` and execute the following to install Asgardeo only dependencies.

```shell
pnpm --filter @wso2is/console --filter @wso2is/myaccount exec node scripts/pre-install.js
```

## Build

From `target/identity-apps` execute the build command.

```shell
pnpm build
```
