All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ghetti.spaghetti-typescript-support.1.4.8.source-code.Spaghetti.ts Maven / Gradle / Ivy

There is a newer version: 2.1
Show newest version
module Spaghetti {
    declare var __modules:Array;

    var moduleBaseUrl:string = function() {
        var moduleUrl = __modules["require"].toUrl("${moduleName}.js");
        var lastIndex = moduleUrl.lastIndexOf("/");
        return moduleUrl.substr(0, lastIndex + 1);
    }();

    /**
   	 * Returns a URL pointing to this module's given resource.
   	 */
    export function getResourceUrl(resource:string):string {
        if (resource.substr(0, 1) == "/") {
            resource = resource.substr(1);
        }
        return moduleBaseUrl + resource;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy