This is a fairly complete assemblefile
Shows how to:
- load templates
- use tasks with plugins
- use middleware
- register helpers
{ | |
"working_dir": "${project_path:${folder}}", | |
"cmd": ["C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "$file"], | |
"selector": "source.html" | |
} |
const compile = (input, helpers, thisArg) => { | |
return async data => { | |
let ctx = { ...thisArg, ...data }; | |
let keys = []; | |
let vals = []; | |
if (helpers) { | |
for (let key of Object.keys(helpers)) { | |
if (ctx[key] === void 0) { | |
ctx[key] = (...args) => helpers[key].call(ctx, ...args); |
function zip(a, b) { | |
var arr = []; | |
for (var key in a) arr.push([a[key], b[key]]); | |
return arr; | |
} | |
console.log(zip('foo', 'bar')); | |
//=> [ [ 'f', 'b' ], [ 'o', 'a' ], [ 'o', 'r' ] ] | |
console.log(zip(['a', 'b', 'c'], ['x', 'y', 'z'])); |
/** | |
* This variant takes a max depth as the second argument. | |
*/ | |
const permutations = (value, max = value.length) => { | |
let depth = Math.min(max, value.length); | |
let results = []; | |
const permute = (queue = []) => { | |
if (queue.length === depth) { |
'use strict'; | |
const download = require('download'); | |
/** | |
* Download all ballots | |
*/ | |
const dl = async (baseurl, dest) => { | |
const pending = []; |
'use strict'; | |
const values = new Map(); | |
const getValues = hash => { | |
const v = values.get(hash) || new Map(); | |
values.set(hash, v); | |
return v; | |
}; |
'use strict'; | |
const colors = require('ansi-colors'); | |
const chars = { | |
backslash: '\\', | |
backtick: '`', | |
caret: '^', | |
colon: ':', | |
comma: ',', |
Do not delete. |
module.exports = [ | |
'014a', | |
'0x706272', | |
'13steinj', | |
'2bdb2', | |
'_3442', | |
'__crackers__', | |
'_selfishPersonReborn', | |
'a_redditor', | |
'Aceeri', |