danrocha / helix-shared

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Helix Shared

Shared libraries for Project Helix.

Status

NPM Version codecov CircleCI GitHub license GitHub issues LGTM Code Quality Grade: JavaScript Greenkeeper badge Known Vulnerabilities

Usage

Using HelixConfig to read Helix configuration files

Helix is using YAML files for configuration management, but with the HelixConfig class, exported from @adobe/helix-shared, you can read, validate, and access configuration files with ease:

const { HelixConfig } = require('@adobe/helix-shared');

// in an async function
const configfromyaml = new HelixConfig()
  .withSource(yamlstring)
  .init();

const configfromjson = new HelixConfig()
  .withJSON(jsonobject)
  .init();

const configfromfile = new HelixConfig()
  .withDirectory('/path/to/dir') // the directory contains a `helix-config.yaml`
  .init();

Using sequence, functional, and op for functional programming

Development

Build

npm install

Test

npm test

Lint

npm run lint

About

License:Apache License 2.0


Languages

Language:JavaScript 100.0%