dist/src/output-files/index.js
function outputPath(options, source) {
    var DEBUG = false;
    if (DEBUG)
        console.log('sourceFolder: ' + options.sourceFolder);
    var globBase = options.sourceFolder.replace(/\*.*/, '');
    if (globBase.endsWith('.sol')) // single file
        globBase = path.join(globBase, '../');
    if (DEBUG)
        console.log('globBase: ' + globBase);
    var optDestination = options.destinationFolder ? options.destinationFolder : globBase;
    if (DEBUG)
        console.log('optDestination: ' + optDestination);
    var destinationFolder = path.join(globBase, optDestination);
    if (optDestination === globBase)
        destinationFolder = globBase;
    if (DEBUG)
        console.log('destinationFolder: ' + destinationFolder);
    // destination-folder is absolut
    if (options.destinationFolder && options.destinationFolder.startsWith('/'))
        destinationFolder = path.join(options.destinationFolder, './');
    var fileNameRelative = source.filename.replace(globBase, '');
    if (DEBUG)
        console.log('fileNameRelative: ' + fileNameRelative);
    var goalPath = path.join(destinationFolder, fileNameRelative);
    return goalPath;
}
function outputPath(options, source) {
    var DEBUG = false;
    if (DEBUG)
        console.log('sourceFolder: ' + options.sourceFolder);
    var globBase = options.sourceFolder.replace(/\*.*/, '');
    if (globBase.endsWith('.sol')) // single file
        globBase = path.join(globBase, '../');
    if (DEBUG)
        console.log('globBase: ' + globBase);
    var optDestination = options.destinationFolder ? options.destinationFolder : globBase;
    if (DEBUG)
        console.log('optDestination: ' + optDestination);
    var destinationFolder = path.join(globBase, optDestination);
    if (optDestination === globBase)
        destinationFolder = globBase;
    if (DEBUG)
        console.log('destinationFolder: ' + destinationFolder);
    // destination-folder is absolut
    if (options.destinationFolder && options.destinationFolder.startsWith('/'))
        destinationFolder = path.join(options.destinationFolder, './');
    var fileNameRelative = source.filename.replace(globBase, '');
    if (DEBUG)
        console.log('fileNameRelative: ' + fileNameRelative);
    var goalPath = path.join(destinationFolder, fileNameRelative);
    return goalPath;
}
function outputPath ( options , source ) { var DEBUG = false ; if ( DEBUG ) console . log ( 'sourceFolder: ' + options . sourceFolder ) ; var globBase = options . sourceFolder . replace ( / \*.* / , '' ) ; if ( globBase . endsWith ( '.sol' ) ) // single file globBase = path . join ( globBase , '../' ) ; if ( DEBUG ) console . log ( 'globBase: ' + globBase ) ; var optDestination = options . destinationFolder ? options . destinationFolder : globBase ; if ( DEBUG ) console . log ( 'optDestination: ' + optDestination ) ; var destinationFolder = path . join ( globBase , optDestination ) ; if ( optDestination === globBase ) destinationFolder = globBase ; if ( DEBUG ) console . log ( 'destinationFolder: ' + destinationFolder ) ; // destination-folder is absolut if ( options . destinationFolder && options . destinationFolder . startsWith ( '/' ) ) destinationFolder = path . join ( options . destinationFolder , './' ) ; var fileNameRelative = source . filename . replace ( globBase , '' ) ; if ( DEBUG ) console . log ( 'fileNameRelative: ' + fileNameRelative ) ; var goalPath = path . join ( destinationFolder , fileNameRelative ) ; return goalPath ; }
determines where the output should be written
determines where the output should be written