examples/template_stealjs/steal/steal.js
function() {

			var current = File.cur().dir(),
				//if you are cross domain from the page, and providing a path that doesn't have an domain
				path = this.path;
			if (/^\/\//.test(this.path)) { //if path is rooted from steal's root (DEPRECATED) 
				path = this.path.substr(2);
			} 
			else if (/^\.\//.test(this.path)) { // should be relative
				this.path = this.path.substr(2);
				path = this.joinFrom(current);
				this.path = "./" + this.path;
			}
			else if (/^[^\.|\/]/.test(this.path)) {}
			else {
				if (this.relative() ||
				File.cur().isCrossDomain() && //if current file is on another domain and
				!this.protocol()) { //this file doesn't have a protocol
					path = this.joinFrom(current);
				}
			}
			
			return path;
		}
function() {

			var current = File.cur().dir(),
				//if you are cross domain from the page, and providing a path that doesn't have an domain
				path = this.path;
			if (/^\/\//.test(this.path)) { //if path is rooted from steal's root (DEPRECATED) 
				path = this.path.substr(2);
			} 
			else if (/^\.\//.test(this.path)) { // should be relative
				this.path = this.path.substr(2);
				path = this.joinFrom(current);
				this.path = "./" + this.path;
			}
			else if (/^[^\.|\/]/.test(this.path)) {}
			else {
				if (this.relative() ||
				File.cur().isCrossDomain() && //if current file is on another domain and
				!this.protocol()) { //this file doesn't have a protocol
					path = this.joinFrom(current);
				}
			}
			
			return path;
		}
function ( ) { var current = File . cur ( ) . dir ( ) , //if you are cross domain from the page, and providing a path that doesn't have an domain path = this . path ; if ( / ^\/\/ / . test ( this . path ) ) { //if path is rooted from steal's root (DEPRECATED)  path = this . path . substr ( 2 ) ; } else if ( / ^\.\/ / . test ( this . path ) ) { // should be relative this . path = this . path . substr ( 2 ) ; path = this . joinFrom ( current ) ; this . path = "./" + this . path ; } else if ( / ^[^\.|\/] / . test ( this . path ) ) { } else { if ( this . relative ( ) || File . cur ( ) . isCrossDomain ( ) && //if current file is on another domain and ! this . protocol ( ) ) { //this file doesn't have a protocol path = this . joinFrom ( current ) ; } } return path ; }
For a given path, a given working directory, and file location, update the path so
it points to a location relative to steal's root.

We want everything relative to steal's root so the same app can work in multiple pages.

./files/a.js = steals a.js
./files/a = a/a.js
files/a = //files/a/a.js
files/a.js = loads //files/a.js
For a given path a given working directory and file location update the path so it points to a location relative to steal s root .