Usually when I use Gulp, I start with:
gulp.src('some/file.txt).pipe( ... ) // etc
Is it possible to use a string instead of a file? For instance:
gulp.str('some text').pipe( .... )
The use case I'm working on is that I create an ad-hoc SCSS string and want to pass it to libsass. But I do not want to create a temporary file, but instead I use an unprocessed string. Example:
var myString = 'html { color: red; }';
gulp.str(myString).pipe(sass())
Is it possible?
source
share