Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // this is in the pattern library that gets imported as a node package
  2.  
  3. 'use strict';
  4.  
  5. const fractal = require('@frctl/fractal').create();
  6.  
  7. fractal.components.set('path', `${__dirname}/patterns`);
  8.  
  9. fractal.load().then(() => {
  10.  
  11.   const collection = fractal.components;
  12.  
  13.  
  14.   for (let item of collection.flatten()) {
  15.     item.render().then(html => {
  16.       console.log(item.config.dir);
  17.       // console.log(html);
  18.     });
  19.   }
  20.  
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement