# @truffle/config

> Utility for interacting with truffle-config.js files

Latest version **1.3.61** (published 2023-09-07) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @truffle/config
pnpm add @truffle/config
yarn add @truffle/config
bun add @truffle/config
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.3.61 |
| Published | 2023-09-07 |
| First published | 2019-09-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | ^16.20 \|\| ^18.16 \|\| >=20 |
| Dependencies | 8 |
| Unpacked size | 68.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13915 |
| Author | Tim Coulter |
| Maintainers | rizedr, joshuafernandes, cliffoo, kevinbluer, gnidan, haltman, eggplantzzz, fainashalts, cds-amal |
| Keywords | config, ethereum, truffle |

## Links

- npm: https://www.npmjs.com/package/@truffle/config
- Repository: https://github.com/trufflesuite/truffle
- Homepage: https://github.com/trufflesuite/truffle/tree/master/packages/config#readme
- Issues: https://github.com/trufflesuite/truffle/issues
- npm.io page: https://npm.io/package/@truffle/config

## Dependencies (8)

- [conf](https://npm.io/package/conf.md) ^10.1.2
- [debug](https://npm.io/package/debug.md) ^4.3.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [find-up](https://npm.io/package/find-up.md) ^2.1.0
- [@truffle/error](https://npm.io/package/@truffle/error.md) ^0.2.2
- [@truffle/events](https://npm.io/package/@truffle/events.md) ^0.1.25
- [original-require](https://npm.io/package/original-require.md) ^1.0.1
- [@truffle/provider](https://npm.io/package/@truffle/provider.md) ^0.3.13

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.3.61 (latest) — 2023-09-07
- 1.3.55-visual-debugger.0 (visual-debugger) — 2023-05-12
- 1.3.38-hardhat-error.0 (hardhat-error) — 2022-08-25
- 1.3.33-typescript-migrations.0 (typescript-migrations) — 2022-07-21
- 1.3.30-alpha.2 (signTypedData_v4) — 2022-06-24
- 1.3.17-dashboard.1 (dashboard) — 2022-02-01
- 1.3.9-decoder-beta.0 (decoder-beta) — 2021-09-29
- 1.3.7-alpha.1 (eip1559-beta) — 2021-09-13
- 1.5.0-tezos.0 (tezos) — 2020-07-15
- 1.2.21-next.0 (next) — 2020-07-09
- 1.2.16-alphaTez.0 (alphaTez) — 2020-02-17
- 1.2.11-truffleLogger.0 (truffleLogger) — 2020-01-16
- 1.2.6-micah.0 (micah) — 2019-11-08
- 1.2.0-ens-events.0 (ens-events) — 2019-09-27
- 1.3.60 — 2023-08-29
- … 149 more at https://npm.io/package/@truffle/config/versions

## README

# @truffle/config
Utility for interacting with truffle-config.js files

### Usage
 ```javascript
const TruffleConfig = require("@truffle/config");
```

#### Instantiate default TruffleConfig object
 ```javascript
const newConfig = TruffleConfig.default();
```

#### Instantiate custom TruffleConfig object
 ```javascript
const customConfig = new TruffleConfig("/truffleDirPath", "/currentWorkingDirPath", networkObj);
```

#### Config.detect()
 ```javascript
// find config file & return new TruffleConfig object with config file settings (cwd)
const truffleConfig = TruffleConfig.detect();

// find config file & return new TruffleConfig object from custom working dir
const truffleConfig = TruffleConfig.detect({ workingDirectory: "./some/Path" });

// find & return new TruffleConfig object from custom named config
const customTruffleConfig = TruffleConfig.detect({}, "./customConfig.js");
 ```

---
_Source: https://npm.io/package/@truffle/config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
