Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qnipp/meteor-yaml
Compiler plugin to import YAML files wih endings .yaml and .yml
https://github.com/qnipp/meteor-yaml
Last synced: 9 days ago
JSON representation
Compiler plugin to import YAML files wih endings .yaml and .yml
- Host: GitHub
- URL: https://github.com/qnipp/meteor-yaml
- Owner: qnipp
- License: mit
- Created: 2020-01-28T08:15:28.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-28T09:28:17.000Z (almost 5 years ago)
- Last Synced: 2024-05-02T21:22:25.418Z (7 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```javascript
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.
```javascript
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