atma-loader-yml
v1.0.4
Published
Yaml parser for `atma-io`, `IncludeJS` and `atma-server`.
Readme
Yaml Parser (Atma Plugin)
The Plugin extends:
IncludeJSwith a custom loaderatma-iowith a custom middleware to read Yml files as Jsonatma-serverandAtma Toolkitwith aHTTPHandlerto serve compiled sources as Json
How to use
Embed into the Project
atma plugin install atma-loader-ymlThis adds
atma-loader-lessnpm dependency and thepackage.jsonwould look like:{ "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 -grequired once for plugin installation sugarinstall plugin:
$ atma plugin install atma-loader-ymladd
test.htmlto the directory<!DOCTYPE html> <script src='http://cdn.jsdelivr.net/g/jquery'></script> <script> $.getJSON('/test.yml').then(function(json) { console.log(json); }) </script>add
test.ymlname: Foostart the server:
$ atma serveropen the browser:
http://localhost:5777/test.html
(c) MIT License - Atma.js Project

