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/bash | |
# We need to do a few things here. | |
# 1) Build the repo | |
set -e; | |
APP="$2"; IMAGE="app/$APP"; NAME=$1 | |
META="$HOME/meta" | |
APPMETA="$META/$NAME" |
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/bash | |
FILE='../repos.txt' | |
isDir=false | |
yes=n | |
do_get_new () { | |
running=true | |
while $running; do |
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
packages.forEach(function(package) { | |
// Build the assets for each package and concatenate each of them (css and js) | |
// We'll have the following in the .tower/ folder: | |
// | |
// + raw/ | |
// -> This folder will contain the raw concatenated files of each package. | |
// + packages/ | |
// -> This folder will contain the concatenated assets for each package. | |
// + final/ | |
// -> The final, concatenated assets of all the packages. This will result in a `app.js` and `app.css`. These files |
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
// Define the autoloading directories: | |
require('tower').create({ | |
directories: 'default' | |
}); |
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
function History(options) { | |
this.timestamp = options.timestamp || new Date(); | |
this.time = options.time || new Date().getTime(); | |
} | |
function Server(options) { | |
this.port = options.port || null; | |
this.alias = options.alias || null; | |
this.queue = []; | |
this.history = options.history || []; |
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
class Model | |
fields: [] | |
constructor: -> | |
@fields = [] | |
@outgoing = [] | |
@incoming = [] | |
@field: (name) -> | |
console.log @ |
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
Tower.watch(path.join(Tower.path, 'packages', '**', '*')) | |
.ignore(/node_modules/) | |
.filter(/Test\.js$/) | |
.latency(0.2) | |
.forcePolling(false) | |
.on('changed', function(files) { | |
console.log(files); | |
}) | |
.on('removed', function(files) {}) | |
.on('added', function(files) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Fast Boot</title> | |
</head> | |
<body> | |
<!-- Main application template --> | |
<script type="text/x-handlebars" data-template-name="application"> | |
Application Template - {{name}} |
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
// client: | |
// Hybrid appoach: | |
define(function (require) { | |
var Tower = require('tower'); | |
var App = require('app'); | |
App.initialize(); |
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
define(function(require, module){ | |
// Only use module to access it's ID, and other information, such as parent module. | |
// Require is completely synchronous - because everything ends up being one huge file | |
var Tower = require('tower'); | |
var App = require('app'); | |
// This module will return the result of initialize() | |
return App.initialize(); | |
}); |