function compile(opts) {
    var srcPath  = opts['src'] || process.cwd()
    var dstPath  = opts['dst']
    var format   = opts['format'] || 'cjs'
    var toStdout = dstPath === 'stdout'
    var stat     = fs.statSync(srcPath)

    if (!srcPath) {
        srcPath = path.cwd()
    }

    // calculate destiny path based on source path
    if (!dstPath) {
        dstPath = path.join(
            path.dirname(srcPath),
            path.basename(srcPath, util.ext) + (stat.isFile() ? '.js' : '')
        )
    }

    if (stat.isFile()) {
        compileFile(srcPath, dstPath, format, toStdout)
    } else if (stat.isDirectory()) {
        compileDir(srcPath, dstPath, format)
    }
}
function compile(opts) {
    var srcPath  = opts['src'] || process.cwd()
    var dstPath  = opts['dst']
    var format   = opts['format'] || 'cjs'
    var toStdout = dstPath === 'stdout'
    var stat     = fs.statSync(srcPath)

    if (!srcPath) {
        srcPath = path.cwd()
    }

    
    if (!dstPath) {
        dstPath = path.join(
            path.dirname(srcPath),
            path.basename(srcPath, util.ext) + (stat.isFile() ? '.js' : '')
        )
    }

    if (stat.isFile()) {
        compileFile(srcPath, dstPath, format, toStdout)
    } else if (stat.isDirectory()) {
        compileDir(srcPath, dstPath, format)
    }
}
function compile ( opts ) { var srcPath = opts [ 'src' ] || process . cwd ( ) var dstPath = opts [ 'dst' ] var format = opts [ 'format' ] || 'cjs' var toStdout = dstPath === 'stdout' var stat = fs . statSync ( srcPath ) if ( ! srcPath ) { srcPath = path . cwd ( ) } // calculate destiny path based on source path if ( ! dstPath ) { dstPath = path . join ( path . dirname ( srcPath ) , path . basename ( srcPath , util . ext ) + ( stat . isFile ( ) ? '.js' : '' ) ) } if ( stat . isFile ( ) ) { compileFile ( srcPath , dstPath , format , toStdout ) } else if ( stat . isDirectory ( ) ) { compileDir ( srcPath , dstPath , format ) } }
executes compile command
executes compile command