const-settings
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i const-settings

Weekly Downloads

1

Version

2.0.0

License

ISC

Unpacked Size

5.64 kB

Total Files

6

Last publish

Collaborators

  • smicle