2.0.0 • Published 2 years ago

babel-plugin-syntax-improved-piped-pipelines-operator v2.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

babel-plugin-improved-piped-pipelines

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.

Example

Input

gulp.src('style.css')
	|> plumber()
	|> postcss()
	|> rename('style.min.css')
	|> gulp.dest('dist')

Output

gulp
	.src('style.css')
	.pipe(plumber())
	.pipe(postcss())
	.pipe(rename('style.min.css'))
	.pipe(gulp.dest('dist'))

Usage

operator options can be any of the following: ['|>', '||', '&&', '??']. the default is the pipeline operator

{
	"plugins": [["babel-plugin-improved-piped-pipelines", { "operator": "|>" }]]
}

Contributing

git clone https://github.com/hyperupcall/babel-improved-piped-pipelines
cd babel-plugin-improved-piped-pipelines
pnpm i -r
pnpm publish
2.0.0

2 years ago

1.2.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago