This file contains hidden or 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
| # Backbone CoffeeScript Helpers by M@ McCray. | |
| # Source: http://gist.github.com/625893 | |
| # | |
| # Use Backbone classes as native CoffeeScript classes: | |
| # | |
| # class TaskController extends Events | |
| # | |
| # class TaskView extends View | |
| # tagName: 'li' | |
| # @SRC: '<div class="icon">!</div><div class="name"><%= name %></div>' |
This file contains hidden or 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
| # | |
| # Web App Bundler Util v1.2 | |
| # by M@ McCray | |
| # url http://gist.github.com/637154 | |
| # | |
| # I built this for how I like to work, so YMMV. | |
| # | |
| # This script defines one task: 'build'. It will assemble multiple .coffee (or .less) | |
| # files and compile them into a single .js (or .css) file. There are two main ways | |
| # you can use it. Define the target and list all the source files to assemble into |
This file contains hidden or 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
| // Based on ICanHaz (http://github.com/andyet/ICanHaz.js/blob/master/ICanHaz.js) | |
| // This version supports Mustache and Handlebars | |
| // By M@ McCray | |
| ;var render = (function($, engine){ | |
| var cache = {}, | |
| methods = {}; | |
| $(function(){ | |
| $('script[type="text/html"]').each(function () { | |
| var name = $(this).attr('id'), |
This file contains hidden or 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
| // How about another ES6 class definition proposal? :-) | |
| // What if the the `class` block is a closure? | |
| class Monster extends Sprite { | |
| // This is a block/closure so this creates a local/private variable: | |
| let hitpoints= null; | |
| constructor(name, health=0){ | |
| this.name = name; |
This file contains hidden or 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
| body | |
| div.page | |
| div.title page one | |
| div.content | |
| p A couple of lines here | |
| p Are always fun, right? | |
| div.page | |
| div.title page two | |
| div.content | |
| p A couple of lines here |
This file contains hidden or 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
| body | |
| div.stack | |
| div#one.view | |
| p View One | |
| button.next Next | |
| div#two.view | |
| p View Two | |
| button.back Back |
This file contains hidden or 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
| body | |
| div.stack | |
| div.view | |
| p View One | |
| button.next Next | |
| div.view | |
| p View Two | |
| button.back Back |
This file contains hidden or 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
| .PHONY: compile | |
| time=/usr/bin/time | |
| compile: dart typescript coffeescript haxe jsx | |
| dart: | |
| $(time) dart2js -ooutput/dart.js source/simple.dart | |
| typescript: |
This file contains hidden or 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
| package j; | |
| import jQuery.JQuery; | |
| // Usage: | |
| // j.Q.uery('div'); | |
| class Q { | |
| public static inline function uery(selector:Dynamic, ?context:Dynamic): JQuery { |