# cms-files

This repository contains static assets and scripts used across our CMS systems.

For more info, see:
[**Confluence Doc**](https://getolo.atlassian.net/wiki/spaces/PE/pages/122683451/Managing+files+for+different+CMS)

---

## Bundling implementation

⚠️ Bundling is currently a **manual process** and only applies to the funnel scripts located in `/src`

The bundled output is generated in: `shared/scripts/funnel-scripts`

### ⚙️ Environments

Supported environments:

- `development`
- `staging`
- `production`

⚠️ For `staging` and `production`, please copy the content of `.env.development` and update it with correct values.

#### 🧪 Development (Local)

```bash
npm run dev
```

- Bundles the script and serves it locally at: `http://localhost:3100`

#### 🟠 Staging

> Need to run this manually and push the changes

```bash
npm run build:staging
```

- Generates a bundled file for **staging** with the `.staging` prefix

#### 🔴 Production

> Need to run this manually and push the changes

```bash
npm run build:prod
```

- Generates a bundled file for **production** with the `.min` prefix

## 🚀 Deployment

ℹ️ **Nothing has changed regarding deployment process.**

### For the funnel scripts:

- Manually run the appropriate build command
- Commit the generated file
- Merge into the target branch
