Croak example project structure and configuration scenario
$HOME
├── .croakrc
└── workspace
├── builder
│ ├── tasks
│ ├── node_modules
│ ├── .jshintrc
LIB = $(SRC:src/%.js=lib/%.js) | |
build: $(LIB) | |
define release | |
VERSION=`node -pe "require('./package.json').version"` && \ | |
NEXT_VERSION=`node -pe "require('semver').inc(\"$$VERSION\", '$(1)')"` && \ | |
node -e "\ | |
var j = require('./package.json');\ | |
j.version = \"$$NEXT_VERSION\";\ |
Croak example project structure and configuration scenario
$HOME
├── .croakrc
└── workspace
├── builder
│ ├── tasks
│ ├── node_modules
│ ├── .jshintrc
component
├── src
│ ├── scripts
│ │ ├── module.js
│ │ ├── services
│ │ │ └── cache.js
│ │ ├── directives
│ │ │ └── login.js
│ │ └── filters
@mixin make-grid-columns($cols: $cols-all) { | |
// Common styles for all sizes of grid columns, widths 1-12 | |
@debug #{$cols}; | |
#{$cols} { | |
position: relative; | |
// Prevent columns from collapsing when empty | |
min-height: 1px; | |
// Inner gutter via padding | |
padding-left: ($grid-gutter-width / 2); | |
padding-right: ($grid-gutter-width / 2); |
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
#!/usr/bin/env node | |
/** | |
* A very basic Node.js Bower installer replacement for download private hosted components | |
* @version 0.1 | |
* @license WTFPL | |
* | |
* Usage: | |
* node bower-private-install.js -u username -p password -f ../bower.json | |
* | |
* TODO: |
#!/bin/bash | |
download_status() { | |
if [ -f $1 ]; then | |
while : ; do | |
sleep 1 | |
local speed=$(echo `cat $1 | grep -oh '\([0-9.]\+[%].*[0-9.][s|m|h|d]\)' | tail -1`) | |
echo -n "Downloading... $speed" | |
echo -n R | tr 'R' '\r' |
(function(){function require(p){var path=require.resolve(p),mod=require.modules[path];if(!mod)throw new Error('failed to require "'+p+'"');return mod.exports||(mod.exports={},mod.call(mod.exports,mod,mod.exports,require.relative(path))),mod.exports}require.modules={},require.resolve=function(path){var orig=path,reg=path+".js",index=path+"/index.js";return require.modules[reg]&®||require.modules[index]&&index||orig},require.register=function(path,fn){require.modules[path]=fn},require.relative=function(parent){return function(p){if("."!=p.charAt(0))return require(p);var path=parent.split("/"),segs=p.split("/");path.pop();for(var i=0;i<segs.length;i++){var seg=segs[i];".."==seg?path.pop():"."!=seg&&path.push(seg)}return require(path.join("/"))}},require.register("compiler.js",function(module,exports,require){function isConstant(val){if(/^ *("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|true|false|null|undefined) *$/i.test(val))return!0;if(!isNaN(Number(val)))return!0;var matches;return(matches=/^ *\[(.*)\ |
// for ES5 compliant engines (tested in Chrome, FF and IE9+) | |
// Under WTFPL license ;) | |
function getObjectInheritedMembers(obj) { | |
var members = {}; | |
if (['boolean', 'number', 'string', 'undefined'].indexOf(typeof obj) !== -1 || obj === null) { // support for primitives types | |
obj = Object(obj); | |
} else if (typeof obj === 'function') { | |
members[obj.name || (obj.toString().match(/function (\w*)/) || obj.toString().match(/\[object (\w*)\]/))[1] || 'Anonymous Function'] = Object.getOwnPropertyNames(obj); | |
obj = obj.prototype; | |
} else if (obj.toString() !== '[object Object]' && obj.prototype) { // fix Objects instances and IE |
// for ES5 compliant engines (tested in Chrome, FF and IE9+) | |
// Under WTFPL license ;) | |
function getObjectInheritance(obj) { | |
var hierarchy = []; | |
if (['boolean', 'number', 'string', 'undefined'].indexOf(typeof obj) !== -1 || obj === null) { // support for primitives types | |
obj = Object(obj); | |
} else if (typeof obj === 'function') { | |
hierarchy.push(obj.name || (obj.toString().match(/function (\w*)/) || obj.toString().match(/\[object (\w*)\]/))[1] || 'Anonymous Function'); | |
obj = obj.prototype; | |
} else if (obj.toString() !== '[object Object]' && obj.prototype) { // fix Objects instances and IE |