function convert( name, _path, contents ) {
    var rDefine = /(define\s*\(\s*('|").*?\2\s*,\s*\[)([\s\S]*?)\]/ig,
        rDeps = /('|")(.*?)\1/g,
        root = _path.substr( 0, _path.length - name.length - 3 ),
        dir = path.dirname( _path ),
        m, m2, deps, dep, _path2;

    contents = contents.replace( rDefine, function( m, m1, m2, m3 ) {
        return m1 + m3.replace( rDeps, function( m, m1, m2 ) {
            m2 = path.join( dir, m2 );
            m2 = path.relative( root, m2 );

            m2 = m2.replace(/\\/g, '/');
            return m1 + m2 + m1;
        }) + ']';
    });

    return contents;
}
function convert( name, _path, contents ) {
    var rDefine = /(define\s*\(\s*('|").*?\2\s*,\s*\[)([\s\S]*?)\]/ig,
        rDeps = /('|")(.*?)\1/g,
        root = _path.substr( 0, _path.length - name.length - 3 ),
        dir = path.dirname( _path ),
        m, m2, deps, dep, _path2;

    contents = contents.replace( rDefine, function( m, m1, m2, m3 ) {
        return m1 + m3.replace( rDeps, function( m, m1, m2 ) {
            m2 = path.join( dir, m2 );
            m2 = path.relative( root, m2 );

            m2 = m2.replace(/\\/g, '/');
            return m1 + m2 + m1;
        }) + ']';
    });

    return contents;
}
function convert ( name , _path , contents ) { var rDefine = / (define\s*\(\s*('|").*?\2\s*,\s*\[)([\s\S]*?)\] / ig , rDeps = / ('|")(.*?)\1 / g , root = _path . substr ( 0 , _path . length - name . length - 3 ) , dir = path . dirname ( _path ) , m , m2 , deps , dep , _path2 ; contents = contents . replace ( rDefine , function ( m , m1 , m2 , m3 ) { return m1 + m3 . replace ( rDeps , function ( m , m1 , m2 ) { m2 = path . join ( dir , m2 ) ; m2 = path . relative ( root , m2 ) ; m2 = m2 . replace ( / \\ / g , '/' ) ; return m1 + m2 + m1 ; } ) + ']' ; } ) ; return contents ; }
convert relative path to absolute path.
convert relative path to absolute path .
Convert a file to a xsd