build.js -> page var Handlebars = require('handlebars'); var helpers = require('./helpers'); var partials = require('./partials'); var templates = require(‘./templates’); ! var fs = require(‘fs'); // for working with files ! // initial data var creatives = JSON.parse(fs.readFileSync(‘./creatives.json')); ! // assemble templates var rendered = Handlebars.templates.profiles( {creatives: creatives.shots} );
cURL data from e.g. dribbble.com [{ id: 1684751, title: 'Overview', description: 'I\'ve been working on this in the little spare time that I have these days ;)', height: 600, width: 800, likes_count: 124, comments_count: 6, rebounds_count: 0, url: 'http://dribbble.com/shots/ 1684751-Overview', short_url: ‘…’ }]