---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [config](../index.md) / findDwJson

# Function: findDwJson()

> **findDwJson**(`projectDirectory`): `Promise`\<`string` \| `undefined`\>

Defined in: [packages/b2c-tooling-sdk/src/config/dw-json.ts:197](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/dw-json.ts#L197)

Finds dw.json by searching upward from the starting directory.

## Parameters

### projectDirectory

`string` = `...`

Directory to start searching from (defaults to cwd)

## Returns

`Promise`\<`string` \| `undefined`\>

A Promise that resolves to the path to dw.json if found, or undefined if not found

## Example

```ts
const dwPath = findDwJson();
if (dwPath) {
  console.log(`Found dw.json at ${dwPath}`);
}
```
