-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* glob data files in data folder, excluding listitems * merge data as global data
- Loading branch information
Showing
6 changed files
with
108 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"key": "value", | ||
"key2": "use this for variables you want to load globally", | ||
"title": "Nullizzle shizznit velizzle, hizzle, suscipit own yo', gravida vizzle, arcu.", | ||
"img": { | ||
"avatar": { | ||
"src": "http://placeimg.com/100/100/people", | ||
"alt": "Avatar" | ||
}, | ||
"square": { | ||
"src": "http://placeimg.com/300/300/nature", | ||
"alt": "Square" | ||
}, | ||
"rectangle": { | ||
"src": "http://placeimg.com/400/300/tech", | ||
"alt": "Rectangle" | ||
}, | ||
"landscape-4x3": { | ||
"src": "http://placeimg.com/400/300/tech", | ||
"alt": "4x3 Image" | ||
}, | ||
"landscape-16x9": { | ||
"src": "http://placeimg.com/640/360/tech", | ||
"alt": "16x9 Image" | ||
} | ||
}, | ||
"headline": { | ||
"short": "Lorizzle pimpin' dolizzle sit amet I", | ||
"medium": "Rizzle adipiscing elizzle. Nullam sapien velizzle, shit volutpizzle, my" | ||
}, | ||
"excerpt": { | ||
"short": "Shizz fo shizzle mah nizzle fo rizzle, mah home g-dizzle, gravida vizzle, arcu. Pellentesque crunk tortizzle. Sed erizzle. Black izzle sheezy telliv.", | ||
"medium": "Izzle crazy tempizzle sizzle. We gonna chung gangsta get down get down fo shizzle turpizzle. Away break it down black. Pellentesque bling bling rhoncus fo shizzle. In hac the bizzle platea dictumst. Black dapibizzle. Crackalackin.", | ||
"long": "Curabitizzle fo shizzle diam quizzle nisi nizzle mollizzle. Suspendisse boofron. Morbi odio. Sure pizzle. Crazy orci. Shut the shizzle up maurizzle get down get down, check out this a, go to hizzle sit amizzle, malesuada izzle, pede. Pellentesque gravida. Vestibulizzle check it out mi, volutpat izzle, shiz sed, shiznit sempizzle, da bomb. Funky fresh in ipsum. Da bomb volutpat felis vizzle daahng dawg. Crizzle quis dope izzle fo shizzle my ni." | ||
}, | ||
"description": "Fizzle crazy tortor. Sed rizzle. Ass pimpin' dolor dapibizzle turpis tempizzle fo shizzle my nizzle. Maurizzle pellentesque its fo rizzle izzle turpis. Get down get down we gonna chung nizzle. Shizzlin dizzle eleifend rhoncizzle break it down. In yo ghetto platea dictumst. Bling bling dapibizzle. Curabitur break yo neck, yall fo, pretizzle eu, go to hizzle dope, own yo' vitae, nunc. Bizzle suscipizzle. Ass semper velit sizzle fo.", | ||
"url": "http://lorizzle.nl/", | ||
"name": { | ||
"first": "Junius", | ||
"firsti": "J", | ||
"middle": "Marius", | ||
"middlei": "M", | ||
"last": "Koolen", | ||
"lasti": "K" | ||
}, | ||
"year": { | ||
"long": "2013", | ||
"short": "13" | ||
}, | ||
"month": { | ||
"long": "January", | ||
"short": "Jan", | ||
"digit": "01" | ||
}, | ||
"dayofweek": { | ||
"long": "Sunday", | ||
"short": "Sun" | ||
}, | ||
"day": { | ||
"long": "01", | ||
"short": "1", | ||
"ordinal": "st" | ||
}, | ||
"hour": { | ||
"long": "06", | ||
"short": "6", | ||
"military": "06", | ||
"ampm": "am" | ||
}, | ||
"minute": { | ||
"long": "20", | ||
"short": "20" | ||
}, | ||
"seconds": "31" | ||
} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "foo" : "bar" } |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"test_list_item" : "izzn thizzle" | ||
} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
'use strict'; | ||
|
||
exports['test nodeunit'] = { | ||
'hello world' : function(test){ | ||
test.equals(1,1); | ||
test.done(); | ||
} | ||
}; | ||
'buildPatternData - should merge all JSON files in the data folder except listitems' : function(test){ | ||
var fs = require('fs-extra'); | ||
var plMain = require('../core/lib/patternlab'); | ||
var data_dir = './test/files/_data/'; | ||
|
||
var dataResult = plMain.build_pattern_data(data_dir, fs); | ||
test.equals(dataResult.foo, "bar"); | ||
test.equals(dataResult.test_list_item, undefined); | ||
test.done(); | ||
} | ||
}; |