1.0.5 • Published 7 years ago

spring-config-parser v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Spring Config Parser

A simple parser for Spring externalized configuration files.

It takes a yaml file + a set of active profiles and returns an object with the computed configuration.

Warning: This is highly untested and may only work for my specific use case. Use with caution.

Usage

const fs = require("fs")
const path = require("path")
const parser = require("spring-config-parser")

const filePath = path.join(__dirname, "application.yml")
const file = fs.readFileSync(filePath, "utf8")

const configForProfile = parser(file)

// Get the default configuration
configForProfile()

// Get the configuration for the "test" profile, merged with the default configuration
configForProfile("test")

// Get the configuration for the "test" and "ci" profiles,
// merged together with the default configuration
configForProfile(["test", "ci"])

See the tests for more examples

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.0

7 years ago