Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 642 Bytes

File metadata and controls

34 lines (21 loc) · 642 Bytes

meteor-yaml

Compiler plugin to import YAML files wih endings .yaml and .yml

Installation

meteor add qnipp:yaml

Usage

Import yaml files as JavaScript objects

import config from './config.yaml';

Importing YAML files is restricted to the safe schema, so functions and regexps are not supported.

Use js-yaml

Example: Load a configuration file from the assets located in the private directory.

import yaml from 'meteor/qnipp:yaml';

const mainConfig = yaml.load(Assets.getText('config/main.yaml'));

See https://github.com/nodeca/js-yaml for the complete API.

License

MIT