gulp - command-line to run a task on a specific file
<p>I have a task <code>scripts</code> that do all that normal stuff with scripts on <code>watch</code>:</p>

<pre><code>var folderScripts = "assets/scripts";

gulp.task('scripts', function(){
        gulp.src([
                folderScripts+'/**/*.js',
                '!'+folderScripts+'/**/_*.js',
                '!'+folderScripts+'/**/*.min.js'
            ])

            // uglify, rename, etc etc... 
            .pipe(gulp.dest( function(file) { return file.base; } ));
});
</code></pre>

<p>Sometimes, I may need to run that task <code>scripts</code> only for a specific file outside that folder, ex: <code>assets/plugins/flexsider/flexslider.js</code> I'm wondering if it would be possible to do something like this on terminal:</p>

<pre><code>gulp scripts assets/plugins/flexsider/flexslider.js
</code></pre>

<p>and then the task scripts would replace <code>gulp.src()</code> content for a dynamic content, this case <code>assets/plugins/flexsider/flexslider.js</code>, and would be like this:</p>

<pre><code>var folderScripts = "assets/scripts";

gulp.task('scripts', function(){
        gulp.src('assets/plugins/flexsider/flexslider.js') //this would be the "flag" I passed on terminal line
            // uglify, rename, etc etc... 
            .pipe(gulp.dest( function(file) { return file.base; } ));
});
</code></pre>

<p>I searched for gulp-exec and similares but I think it is not what i'm looking for. </p>

<p>Thanks</p>