jwilson8767 / plugin-yaml

JSON loader plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plugin-yaml

SystemJS YAML loader plugin

Installation

If using jspm just run jspm install github:jwilson8767/plugin-yaml

Usage

To load all URLs with .yaml or .yml filename extension via this plugin:

SystemJS.config({
  map: { 'yaml-loader': 'github:jwilson8767/plugin-yaml@0.1.0/yaml.js' },
  meta: { 
    '*.yaml': { loader: 'yaml-loader', build: false },
    '*.yml': { loader: 'yaml-loader', build: false }
  }
});

then import your desired files with import {data} from 'data.yaml'

Testing this project

npm test

browse to http://localhost:3000/test and open the browser's development console. You should see the json object logged.

About

JSON loader plugin

License:MIT License


Languages

Language:JavaScript 91.0%Language:HTML 9.0%