Transcribed for archival purposes.
an interview with Brian Taylor - by Steve Ogden - Nov 2011
OGDEN:
Did Rustboy fall victim to Hollywood’s notorious “Development Hell”, or to “One-Man Show Fatigue Syndrome”? (Or a combination?)
fs = require 'fs' # node file system module | |
path = require 'path' # node path module | |
# returns json tree representation of directory structure | |
tree = (root) -> | |
# clean trailing '/' | |
root = root.replace /\/+$/ , "" | |
# extract tree ring if root exists | |
if fs.existsSync root | |
ring = fs.lstatSync root |
<script src="ender.min.js"></script> | |
<script> | |
$script('/js/core.min.js', 'core') | |
$script.ready('core', function () { | |
$(document).ready(function () { | |
$('<p>hello world</p>').appendTo('body') | |
.bind('click', function (e) { | |
$script('/js/ajax.min.js', function () { |
# get template on the fly | |
Handlebars.getTemplate = (name)-> | |
if Handlebars.templates is undefined or Handlebars.templates[name] is undefined | |
$.ajax( | |
url: "/templates/" + name | |
success: (data) -> | |
Handlebars.templates = {} if Handlebars.templates is undefined | |
Handlebars.templates[name] = Handlebars.compile(data) | |
error: (xhr, options, err) -> | |
console.log xhr.status |
# Quick hack of regular expressions to convert twitter bootstrap from LESS to Stylus | |
fs = require 'fs' | |
less2stylus = (string) -> | |
string = string | |
.replace(/^(\ *)(.+)\ +\{\ *\n?\ */mg, "$1$2\n$1 ") # remove opening brackets | |
.replace(/^(\ *)([^\ \n]+)\ +\{\ *\n?\ */mg, "$1$2\n$1 ") # remove opening brackets | |
.replace(/\ *\{\ *\n*/g, "\n") # remove opening brackets again (some random cases I'm too lazy to think through) | |
.replace(/\ *\}\ *\n*/g, "\n") # remove closing brackets |
// | |
// Box-sizing mixin | |
// | |
box-sizing($boxmodel) | |
-webkit-box-sizing $boxmodel | |
-moz-box-sizing $boxmodel | |
box-sizing $boxmodel | |
/*! normalize.stylus, stylus port of normalize.css v2.1.2 | MIT License | git.io/normalize */ |
Transcribed for archival purposes.
OGDEN:
Did Rustboy fall victim to Hollywood’s notorious “Development Hell”, or to “One-Man Show Fatigue Syndrome”? (Or a combination?)
git commit -am "$*" && git push origin master |
/*jshint node:true*/ | |
'use strict'; | |
var path = require('path'), | |
url = require('url'), | |
when = require('when'), | |
ffs = require('final-fs'); | |
var reworkRecompile = function (cssPath, reworkPath, doRework) { | |
return ffs.readFile(reworkPath, {encoding: 'utf-8'}) |
{ | |
"name": "test" | |
, "version": "0.0.1" | |
, "description": "mocha" | |
, "keywords": ["test", "tutorial"] | |
, "author": "skw" | |
, "main": "index" | |
, "engines": { "node": "*" } | |
, "scripts": { | |
"test": "make test" |
describe( "Video model", function(){ | |
var MOCK_GET_DATA = { | |
channelName: "tgndeveloperedu", | |
commentCount: 0, | |
defaultOrder: 0, | |
dislikeCount: 0, | |
facebookCount: "0", | |
googleCount: "0", | |
likeCount: 0, |