Skip to content

@salesforce/b2c-tooling-sdk / config / findDwJson

Function: findDwJson() ​

findDwJson(projectDirectory): Promise<string | undefined>

Defined in: packages/b2c-tooling-sdk/src/config/dw-json.ts:168

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>

Path to dw.json if found, undefined otherwise

Example ​

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

Released under the Apache-2.0 License.