This file contains 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
#!/bin/sh | |
# NOTES: | |
# - This script takes only one argument (desired path to create the app) | |
# - It uses uses coffeescript, stylus and jade to as sample files/code | |
# - Its intended to be just an example for getting started, and nothing more | |
# - For more info on Polvo, check the project Site and README: | |
# http://polvo.io | |
# https://github.com/polvo/polvo |
This file contains 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
### | |
Port of MicroEvent in Coffeescript with some naming modifications | |
and a new 'once' method. | |
Original project: | |
https://github.com/jeromeetienne/microevent.js | |
### | |
class MicroEvent | |
_init:-> @_listn or @_listn = {} | |
_create:(e)-> @_init()[e] or @_init()[e] = [] |
This file contains 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
/* | |
USAGE: | |
# at window | |
ns( 'my.namespace' ).MyClass = ... | |
# at app obj | |
var app = {} | |
ns( 'my.namespace', app ).MyClass = ... | |
*/ |
This file contains 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
# Basic configs | |
USER='serpentem' | |
NPM='sudo npm' | |
# Initializes the repo (cloning, remotes, etc) | |
function clone() | |
{ | |
repo=$1 | |
remotes=$2 | |
npmlink=$3 |
This file contains 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
### | |
This file replaces your 'toaster.coffee' config file, you'll not need | |
that anymore since the config is passed to Toaster as a hash/object. | |
Keep in mind that in order for this to work, you'll have to use toaster | |
as a dependency, which can be easily achieved putting the provided | |
'package.json' file in your base dir and running 'npm install' to install | |
toaster locally. Or just enter your project folder and run | |
'npm install coffee-toaster' (not recommend but work as well) |
This file contains 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
# PRIVATE METHODS/PROPERTIES - COFFEESCRIPT | |
# ------------------------------------------------------------------------------ | |
# Simple hack to protect private methods and properties from outside classes, | |
# all props and methods starting with '_' will be unaccessible from outside. | |
class AccessModifiers | |
@for:( scope )-> | |
api = {} |