# truffle-config

> Utility for interacting with truffle-config.js files

Latest version **1.1.20** (published 2019-08-29) · 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.1.20 |
| Published | 2019-08-29 |
| First published | 2017-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 15.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13909 |
| Author | Tim Coulter |
| Maintainers | cruzmolina, davidmurdoch, eggplantzzz, fainashalts, gnidan, haltman, seesemichaelj, tcoulter |
| Keywords | ethereum, truffle, config |

## Links

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

## Dependencies (6)

- [lodash](https://npm.io/package/lodash.md) ^4.17.13
- [find-up](https://npm.io/package/find-up.md) ^2.1.0
- [configstore](https://npm.io/package/configstore.md) ^4.0.0
- [@truffle/error](https://npm.io/package/@truffle/error.md) ^0.0.6
- [original-require](https://npm.io/package/original-require.md) 1.0.1
- [truffle-provider](https://npm.io/package/truffle-provider.md) ^0.1.16

## 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.1.20 (latest) — 2019-08-29
- 1.0.9 (v4) — 2020-02-27
- 1.2.0-ens-events.1 (ens-events) — 2019-08-20
- 1.1.15-ens.0 (ens) — 2019-07-15
- 1.1.0-next.1 (next) — 2018-12-10
- 1.1.0-beta.2 (beta) — 2018-11-21
- 1.0.8 — 2019-08-29
- 1.1.19 — 2019-08-22
- 1.1.18 — 2019-08-08
- 1.1.17 — 2019-07-31
- 1.1.16 — 2019-07-25
- 1.1.15 — 2019-07-18
- 1.1.14 — 2019-07-11
- 1.1.13 — 2019-05-30
- 1.1.12 — 2019-05-16
- … 28 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._
