---
title: "The application building system in the JSS Angular sample app"
slug: "the-application-building-system-in-the-jss-angular-sample-app"
abstract: "Describes tools you can use when building Angular applications with JSS."
---
# The application building system in the JSS Angular sample app

The JSS Angular app includes some build system helpers to make working with the app easier.

<details>
<summary><h2>Scaffolding</h2></summary>

You can [scaffold a new Angular Schematic](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-headless-development/scaffolding-components-in-jss-apps.html "Scaffolding components in JSS apps") using the `jss scaffold <componentName>` command.

JSS Angular Schematics provides a JSS component schematic based on the default `ng generate` component scaffolding tool. When running the script `jss scaffold MyComponent`, it creates a new Angular schematic, creates the disconnected component definition file, and provides helpful feedback about what to do to make your component work.

You can configure scaffolded components by adding/updating the scaffolding settings for Angular Schematics in the `angular.json` file.

The following example shows how to generate new components that use SCSS instead of CSS for styling:

```json
"schematics": {
     "@sitecore-jss/sitecore-jss-angular-schematics:jss-component": {
       "styleext": "scss"
     }
   }

```

For additional settings, consult the [JSS Angular Schematic schema definition](https://github.com/Sitecore/jss/blob/master/packages/sitecore-jss-angular-schematics/src/jss-component/schema.json) or [schema types](https://github.com/Sitecore/jss/blob/master/packages/sitecore-jss-angular-schematics/src/jss-component/schema.d.ts).

</details>

<details>
<summary><h2>Dynamic config generation</h2></summary>

The JSS app needs a more dynamic configuration system than those that the Angular environment files provide because the settings must also integrate with configurations defined in the `scjssconfig.json` file and the `package.json``config` section.

To accomplish this, before a build runs, the script defined in `scripts/generate-config.js` runs and dynamically assembles the `src/environments/environment*.ts` files. The `scripts/generate-config.js` script is fully customizable - or removable - if you have different configuration requirements.

</details>

<details>
<summary><h2>Dynamic component factory module</h2></summary>

When a build starts, the JSS Angular app automatically generates the component factory in the `src/temp/componentFactory.js` file. The component factory is a mapping between JSS component names and their Angular component implementations.

The `src/temp/componentFactory.js` file is generated using conventions for defining your JSS components. It helps avoid manually registering new components. When the app runs locally, the component factory watches for new components and updates the module. This auto-generation is defined in `scripts/generate-component-factory.js`, and is fully customizable.

> [!note]
> To remove this convention from your JSS application:
>
> -   In the `src/temp/.gitignore` file, remove `componentFactory.js`.
>
> -   Delete `/scripts/generate-component-factory.js`.
>
> -   In the `/scripts/bootstrap.js` file, remove the reference to the deleted script.

</details>