Piggybacks on the new pipeline operator syntax to improve developer experience when using a gulp-like piping API. Mainly reduces the repetitive .pipe
call and the messy closing parenthesis ))
Right now, it depends on the conflicting pipeline JavaScript feature, so I hope to repurpose the |>
syntax to something else.
gulp.src('style.css')
|> plumber()
|> postcss()
|> rename('style.min.css')
|> gulp.dest('dist')
gulp.src('style.css')
.pipe(plumber())
.pipe(postcss())
.pipe(rename('style.min.css'))
.pipe(gulp.dest('dist'))
operator
options can be any of the following: ['|>', '||', '&&', '??']
. the default is the pipeline operator
{
"plugins": [
["babel-plugin-improved-piped-pipelines", { "operator": "|>" }]
]
}
git clone https://github.com/hyperupcall/babel-improved-piped-pipelines
cd babel-plugin-improved-piped-pipelines
pnpm i -r
pnpm publish