@dapp-stack/environment
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

@dapp-stack/environment

This package allows you to build your environment and verify that it is conform.

Installation

# Yarn
yarn add @dapp-stack/environment

# NPM
npm install @dapp-stack/environment

Usage

Example of directory structure:

my-dapp
├── environments
    ├── local.js
    ├── rinkeby.js
    ├── mainnet.js
    └── test.js
import * as env from "@dapp-stack/environment";

const environment = env.build()

The name of the file that is read come from the environment variable: DAPP_ENV

If not set, local will be used.

If empty, the environment returned will be:

const defaultEnvironment = {
  ethereum: {
    network: 'dev',
    migrate () { return new Promise(resolve => resolve()) }
  },
  ipfs: false,
  web: {
    framework: 'create-react-app',
    deploy: 'ipfs'
  },
  compile: {
    contracts: []
  }
}

Package Sidebar

Install

npm i @dapp-stack/environment

Weekly Downloads

3

Version

0.5.0

License

Apache-2.0

Unpacked Size

68.6 kB

Total Files

16

Last publish

Collaborators

  • john-solon