@ricardo-tobon/app-config

1.3.1 • Public • Published

@nas-user/app-config

Cascading configuration for web application

Install

npm install --save @nas-user/app-config

Repository

https://github.com/Graf009/app-config.git

Usage

Loads configuration files from a config folder in your project root.

  • default is always loaded if it exists
  • If you specify NODE_ENV=production then both production and default are loaded, with production taking precedence.
  • Any valid JS extension can be used for config - JS, json, etc.
    • To load another extension, register it before you require this module
import config from '@nas-user/app-config'

For working in browser add AppConfigPlugin in webpack config.

import AppConfigPlugin from '@nas-user/app-config/webpack'

var webpackConfig = {
  plugins: [
    new AppConfigPlugin(),
  ]
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.11latest

Version History

VersionDownloads (Last 7 Days)Published
1.3.11

Package Sidebar

Install

npm i @ricardo-tobon/app-config

Weekly Downloads

1

Version

1.3.1

License

MIT

Unpacked Size

4.58 kB

Total Files

7

Last publish

Collaborators

  • ricardo-tobon