Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atmajs/atma-loader-yml
Yaml loader
https://github.com/atmajs/atma-loader-yml
Last synced: 6 days ago
JSON representation
Yaml loader
- Host: GitHub
- URL: https://github.com/atmajs/atma-loader-yml
- Owner: atmajs
- Created: 2014-08-05T23:34:14.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-05T23:34:42.000Z (over 10 years ago)
- Last Synced: 2024-04-14T22:12:07.336Z (7 months ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Yaml Parser _(Atma Plugin)_
-----
[![Build Status](https://travis-ci.org/atmajs/atma-loader-yml.png?branch=master)](https://travis-ci.org/atmajs/atma-loader-yml)The Plugin extends:
- [`IncludeJS`](https://github.com/atmajs/IncludeJS) with a custom loader
- [`atma-io`](https://github.com/atmajs/atma-io) with a custom middleware to read Yml files as Json
- [`atma-server`](https://github.com/atmajs/atma-server) and [`Atma Toolkit`](https://github.com/atmajs/Atma.Toolkit) with a `HTTPHandler` to serve compiled sources as Json##### How to use
###### Embed into the Project
+ `atma plugin install atma-loader-yml`
This adds `atma-loader-less` npm dependency and the `package.json` would look like:
```json
{
"dependency": {
"atma-loader-yml"
},
"atma": {
"plugins": [
"atma-loader-yml"
],
"settings": {
"atma-loader-yml": {
"extension": "yml"
}
}
}
}
```
+ That's all. Now, you are ready to use yml instead of json in your project##### Quick Try
+ install atma: `$ npm install atma -g` _required once for plugin installation sugar_
+ install plugin: `$ atma plugin install atma-loader-yml`
+ add `test.html` to the directory```html
$.getJSON('/test.yml').then(function(json) {
console.log(json);
})
```
+ add `test.yml`
```css
name: Foo
```
+ start the server: `$ atma server`
+ open the browser: `http://localhost:5777/test.html`----
_(c) MIT License - Atma.js Project_