It can be quite confusing to new users that:
<module name="test">
define(function() {
console.log('running');
Key Innovation: Use source map information to determine which changed files result in which files having to be rebuilt.
Source Maps and this innovation concept is why I'm even considering polluting this noisy space even further!
// add the steal format as the first priority check | |
System.formats.unshift('steal'); | |
// create the steal format detection | |
var stealRegEx = /(?:^\s*|[}{\(\);,\n\?\&]\s*)steal\s*\(\s*((?:"[^"]+"\s*,|'[^']+'\s*,\s*)*)/; | |
System.format.steal = { | |
detect: function(source, load) { | |
var match = source.match(stealRegEx); | |
if (match) | |
return match[1] ? eval(match[1].substr(0, match[1].lastIndexOf(','))) : []; |
var spdy = require('spdy'); // node-spdy | |
var spdyAssetServer = require('spdy-asset-server'); // the proposed spdy-asset-server library | |
// given a url, provide the asset response stream | |
// custom serving function allows dynamic + static assets | |
var assetServer = new spdyAssetServer(function(url, stream) { | |
if (url == 'style/style.css') | |
stream.pipe(fs.createReadStream('/local/file/system/style.css')); | |
else if (url == 'style/style.less') | |
stream.pipe(less.createEncodingStream(fs.createReadStream('/local/file/system/style.less'))); |
(function() { | |
window.Loader = function(parent, options) { | |
this.global = options.global || {}; | |
this.baseURL = options.baseURL || parent.baseUrl; | |
this._parent = parent || null; | |
this._strict = options.strict || false; | |
this.normalize = options.normalize || parent.normalize; | |
this.resolve = options.resolve || parent.resolve; |
/* | |
* requireJS trace | |
* | |
* Given a configuration object, as would be passed to the optimizer, | |
* runs a raw build trace on the configuration, returning the traced | |
* dependency trees. | |
* | |
* Loaded as a requirejs module on the server. | |
* | |
* eg: |
var GETSET = { | |
_extend: { | |
properties: 'IGNORE' | |
}, | |
addProperty: function(p, startVal) { | |
var curVal = startVal; | |
this[p] = function(val) { | |
if (arguments.length) | |
curVal = val; | |
else |
/* | |
Allows for ajax requests to be run synchronously in a queue | |
Usage:: | |
var queue = new $.AjaxQueue(); | |
queue.add({ | |
url: 'url', |
#!/bin/bash | |
# Download Drush v3 from D.O and make it work on `drush` (OS X / Linux / *nix) | |
# Written by stemount, adapted by KarenS | |
# Last updated by Drupalise IT (http://drupalise.it) on 13 Sep 2010 | |
# Update user | |
echo "Drush is now downloading via HTTP" | |
# move to home dir |