SystemJS YAML loader plugin
If using jspm just run jspm install github:jwilson8767/plugin-yaml
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'
npm test
browse to http://localhost:3000/test and open the browser's development console. You should see the json object logged.