Created
April 13, 2014 18:54
-
-
Save jonschlinkert/10597130 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define a config object to load data (for templates etc) | |
var config = [ | |
// load data to the root object | |
['components/*.json'], | |
// load data to the `pkg` object | |
{name: 'pkg', src: 'package.json'}, | |
// load data to the `site` object | |
{name: 'site', src: '.assemblerc.yml'}, | |
// load data to an object named after the basename of each file | |
// e.g. foo.json is loaded to `{foo: {// data}}` | |
{name: ':basename', src: ['data/*.{json,yml}']}, | |
// Load data from src to `{a: {b: {c: {// data}}}` | |
{dothash: true, name: 'a.b.c', src: ['*.json']} | |
]; | |
// Load in config data. | |
var data = plasma.load(config); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment