Skip to content

Instantly share code, notes, and snippets.

View fracmak's full-sized avatar

Jay Merrifield fracmak

View GitHub Profile
@fracmak
fracmak / assetConfig.js
Last active August 29, 2015 14:10
MEAN.io asset.json builder
#!/usr/bin/env node
'use strict';
var bower = require('bower'),
path = require('path'),
_ = require('lodash');
function normalize(src) {
return src.replace(/\\/g, '/');
/**
* Given an html element or jquery object, will return a serializable object representation of that node
* @param {HTMLElement|jQuery} element
* @param {Boolean} [recurse] - specifying whether we want to build objects for the children
* @returns {Object}
*/
function elementToObject(element, recurse) {
var el = $(element),
o = {
tagName: el[0].tagName
@fracmak
fracmak / gist:6631026
Created September 19, 2013 23:01
Find if a entry is either a key or a value in the map, and return the key
_easingMap: {
'easeInQuad': 'ease-in',
'easeInSine': 'ease-in',
'easeInCubic': 'ease-in',
'easeInQuart': 'ease-in',
'easeInQuint': 'ease-in',
'easeInExpo': 'ease-in',
'easeInCirc': 'ease-in',
'easeInBack': 'ease-in',
'easeInElastic': 'ease-in',