UNPKG

guide201

Version:

Atlas is living style-guides & pattern library static site generator with extensive CSS monitoring and components info that could be used virtually with any scss/css project

14 lines (11 loc) 356 B
'use strict'; const fs = require('fs'); const path = require('path'); module.exports = function(text, render) { const resource = path.resolve(process.cwd(), render(text)); if (fs.existsSync(resource)) { return fs.readFileSync(resource, 'utf8'); } else { console.warn('[Atlas]: file to inline not found ' + resource); } };