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
var fs = require('fs') | |
var _ = require('underscore') | |
var exclude = ['moveit.js', 'node_modules']; | |
function doIt(path) { | |
fs.readdir(path,function(err,files){ | |
if(err) throw err; | |
files.forEach(function(file){ | |
if (_.indexOf(exclude, file) == -1) { |
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
env.helpers.getSortedContentFolder = function (folder, contents) { | |
var out = []; | |
// pages in root level | |
if (contents[folder]._.pages.length > 0 ) { | |
_.each(contents[folder]._.pages, function(item){ | |
out.push(item) | |
}) | |
} |