Skip to content

Instantly share code, notes, and snippets.

View onlyurei's full-sized avatar

Cheng Fan onlyurei

  • TikTok / ByteDance
  • San Francisco Bay Area, CA
View GitHub Profile
@millermedeiros
millermedeiros / build.xml
Created February 13, 2011 20:57
RequireJS optimizer Ant task
<?xml version="1.0" encoding="utf-8"?>
<project name="sample-require-js" default="" basedir=".">
<!-- properties -->
<property name="r.js" value="_build/rjs/r.js" />
<property name="closure.jar" value="_build/closure/compiler.jar" />
<property name="rhino.jar" value="_build/rhino/js.jar" />
<property name="js.build" value="_build/js.build.js" />
<property name="css.build" value="_build/css.build.js" />
@domenic
domenic / knockout-es5.js
Created February 10, 2012 21:51
Speculations on an ES5-style KnockoutJS
// DESIRED (pending bikeshedding):
// Create using special factory function. Will automatically create `ko.observable`s, `ko.observableArray`s, and
// `ko.computed`s for you, but hide them behind getters/setters.
var viewModel = es5ViewModel({
firstName: "Luke",
lastName: "Skywalker",
fullName: function () {
return this.fullName + this.lastName;
},