Skip to content

Instantly share code, notes, and snippets.

View sgilligan's full-sized avatar

Simon Gilligan sgilligan

  • Demographic Mapping Online
  • Melbourne
View GitHub Profile
@samueljseay
samueljseay / yui-module-extension
Last active August 11, 2016 01:35
YUI module loading extension for System.js
(function yui() {
var systemInstantiate = System.instantiate,
//Store just one Y sandbox
YSandbox;
//Extracts the dependency list from the YUI module source code (if any exist)
function getYUIDeps(src, Y, load) {
var stripRequire = /(\"requires\"|\'requires\'|\s*requires\s*)\s*:\s*/g,
findRequire = /(\"requires\"|\'requires\'|\s*requires\s*)\s*:\s*\[[\s\S]*?\](\s*,\s*(\"skinnable\"|skinnable|\'skinnable\')\s*:\s*(true|false))*/g,
skinnable = /(\"skinnable\"|skinnable|\'skinnable\')\s*:\s*(true|false)/