tasks/js_simple.js
function compileSingleFile (filePath, isDebug, options)
{
    var outputPath = "./" + path.dirname(filePath).replace(/(^|\/)assets\/js/, "$1public/js");
    var uglifyOptions = {};

    gulpUtil.log(gulpUtil.colors.blue("Uglify"), pathHelper.makeRelative(filePath), " -> ", pathHelper.makeRelative(outputPath) + "/" + path.basename(filePath));

    if (options.lint)
    {
        jsHintHelper.lintFile(filePath);
    }

    if (isDebug)
    {
        uglifyOptions.compress = false;
        uglifyOptions.preserveComments = "all";
    }

    return gulp.src(filePath)
        .pipe(plumber())
        .pipe(uglify(uglifyOptions))
        .pipe(gulp.dest(outputPath));
}
function compileSingleFile (filePath, isDebug, options)
{
    var outputPath = "./" + path.dirname(filePath).replace(/(^|\/)assets\/js/, "$1public/js");
    var uglifyOptions = {};

    gulpUtil.log(gulpUtil.colors.blue("Uglify"), pathHelper.makeRelative(filePath), " -> ", pathHelper.makeRelative(outputPath) + "/" + path.basename(filePath));

    if (options.lint)
    {
        jsHintHelper.lintFile(filePath);
    }

    if (isDebug)
    {
        uglifyOptions.compress = false;
        uglifyOptions.preserveComments = "all";
    }

    return gulp.src(filePath)
        .pipe(plumber())
        .pipe(uglify(uglifyOptions))
        .pipe(gulp.dest(outputPath));
}
function compileSingleFile ( filePath , isDebug , options ) { var outputPath = "./" + path . dirname ( filePath ) . replace ( / (^|\/)assets\/js / , "$1public/js" ) ; var uglifyOptions = { } ; gulpUtil . log ( gulpUtil . colors . blue ( "Uglify" ) , pathHelper . makeRelative ( filePath ) , " -> " , pathHelper . makeRelative ( outputPath ) + "/" + path . basename ( filePath ) ) ; if ( options . lint ) { jsHintHelper . lintFile ( filePath ) ; } if ( isDebug ) { uglifyOptions . compress = false ; uglifyOptions . preserveComments = "all" ; } return gulp . src ( filePath ) . pipe ( plumber ( ) ) . pipe ( uglify ( uglifyOptions ) ) . pipe ( gulp . dest ( outputPath ) ) ; }
Compiles a single file

@param {string} filePath
@param {boolean} isDebug
@param {UglifyTaskOptions} options
@returns {*}
Compiles a single file