lib/cmd.js
function pathToId(file, base, rel) {
    var id = rel ? path.resolve(rel, '..', file) : file;
    id = path.relative(base, id);
    // replace \ with / in windows' path and remove extname in path
    id = id.replace(BACKLASH_RE, '/').replace(JS_EXT_RE, '');
    return id;
}
function pathToId(file, base, rel) {
    var id = rel ? path.resolve(rel, '..', file) : file;
    id = path.relative(base, id);
    // replace \ with / in windows' path and remove extname in path
    id = id.replace(BACKLASH_RE, '/').replace(JS_EXT_RE, '');
    return id;
}
function pathToId ( file , base , rel ) { var id = rel ? path . resolve ( rel , '..' , file ) : file ; id = path . relative ( base , id ) ; // replace \ with / in windows' path and remove extname in path id = id . replace ( BACKLASH_RE , '/' ) . replace ( JS_EXT_RE , '' ) ; return id ; }
Convert filepath to toplevel module id
@param {String} file - filepath to convert
@param {String} base - basepath of seajs
@param {String} [rel] - relative path of file
@returns {String} id
Convert filepath to toplevel module id