packages/master-tasks/tasks/srcmap.js
function separateScriptAndMapFromScriptFile(scriptFile, multiline, mapPath) {
    const node = getNodeFromScriptFile(scriptFile);
    mapPath = mapPath || path.basename(scriptFile) + '.map';
    return {
        script: node.toString().replace(/\r\n/gm, '\n') + (
            multiline
            ? ('/*# sourceMappingURL=' + mapPath + ' */')
            : ('//# sourceMappingURL=' + mapPath)
           ),
        map: JSON.stringify(getCodeMap(node).map.toJSON()),
    };
}
function separateScriptAndMapFromScriptFile(scriptFile, multiline, mapPath) {
    const node = getNodeFromScriptFile(scriptFile);
    mapPath = mapPath || path.basename(scriptFile) + '.map';
    return {
        script: node.toString().replace(/\r\n/gm, '\n') + (
            multiline
            ? ('/*# sourceMappingURL=' + mapPath + ' */')
            : ('//# sourceMappingURL=' + mapPath)
           ),
        map: JSON.stringify(getCodeMap(node).map.toJSON()),
    };
}
function separateScriptAndMapFromScriptFile ( scriptFile , multiline , mapPath ) { const node = getNodeFromScriptFile ( scriptFile ) ; mapPath = mapPath || path . basename ( scriptFile ) + '.map' ; return { script : node . toString ( ) . replace ( / \r\n / gm , '\n' ) + ( multiline ? ( '/*# sourceMappingURL=' + mapPath + ' */' ) : ( '//# sourceMappingURL=' + mapPath ) ) , map : JSON . stringify ( getCodeMap ( node ) . map . toJSON ( ) ) , } ; }
separate source script and map from file
separate source script and map from file