2.0.0 • Published 3 years ago

const-settings v2.0.0

Weekly downloads
20
License
ISC
Repository
github
Last release
3 years ago

const-settings

npm version License: ISC

Intro

By placing a specific YAML under config/ and defining the constants, you can easily read the value.

Installation

npm install const-settings

Settings

Place the file that defines the constants in config/settings.yaml or config/settings.yml.
If you want to split the file, set YAML under config/settings/.

Configuration Example

├── config
│   ├── settings
│   │   ├── fuga.yaml
│   │   └── piyo.yml
│   ├── settings.yaml
│   └── settings.yml
├── package-lock.json
└── package.json

Usage

JavaScript

const Settings = require('const-settings').default

Settings.PIYO.forEach(v => console.log(v))

TypeScript

import Settings from 'const-settings'

Settings.PIYO.forEach((v: string) => console.log(v))

Test

npm run test
2.0.0

3 years ago

1.0.0

4 years ago

0.1.0

4 years ago

0.0.1

4 years ago