npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

generator-chain

v1.1.1

Published

Pipelines Generator is a yeoman based utility to generate single responsibility classes representing logic actions bound together into commands or queries which are also called pipelines. Available generators: C#, Typescript, Sitecore.

Downloads

2

Readme

Pipelines Generator

Pipelines Generator is a yeoman based utility to generate single responsibility classes representing logic actions bound together into commands or queries which are also called pipelines. The represented generator allows you to create complete pipeline from scratch on clear solution or create a pipeline which is based on packages like Pipelines.NET for C# or solid-pipelines for TypeScript which expose the main functionality which, you may see, used in pipelines from scratch a lot.

Main goal of this generator is to speed up a process of creating pipelines, by introducing common pipeline usage patterns i.e. introducing arguments with members, pipelines binding together processors, executors running pipelines with some options.

List of available pipelines generators

  • Typescript pipeline generator (uses an alias ts in program)
  • Typescript pipeline generator, boosted with solid-pipelines package (uses an alias tsp in program)
  • C# pipeline generator (uses an alias cs in program)
  • C# pipeline generator, boosted with Pipelines.NET package (uses an alias csp in program)
  • Sitecore pipeline (uses an alias sc in program)

TypeScript generator [alias: ts] and solid-pipelines boosted generator [alias: tsp]

Example:

yo chain:ts --pipeline-name "HelloWorld" --processor-names "AdjustMessageColor LogMessageToConsole"

Result:

Generates for you a structure like this:

HelloWorld
|
|__processors
|  |__AdjustMessageColor.ts
|  |__LogMessageToConsole.ts
|  |__index.ts
|
|__HelloWorld_Arguments.ts
|__HelloWorld_Processor.ts
|__HelloWorld_Messages.ts
|__HelloWorld_Pipeline.ts
|__HelloWorld_Executor.ts
|__index.ts

* - (note) underscore symbol is added to this example for better visual perception. 

C# generator [alias: cs] and Pipelines net boosted generator [alias: csp]

Example:

yo chain:cs --pipeline-name "HelloWorld" --processor-names "AdjustMessageColor LogMessageToConsole"

Result:

Generates for you a structure like this:

HelloWorld
|
|__processors
|  |__AdjustMessageColor.cs
|  |__LogMessageToConsole.cs
|
|__HelloWorld_Arguments.cs
|__HelloWorld_Processor.cs
|__HelloWorld_Messages.cs
|__HelloWorld_Pipeline.cs
|__HelloWorld_Executor.cs

* - (note) underscore symbol is added to this example for better visual perception. 

Sitecore generator [alias: sc]

Example:

yo chain:sc --pipeline-name "HelloWorld" --processor-names "AdjustMessageColor LogMessageToConsole"

Result:

Generates for you a structure like this:

HelloWorld
|
|__App_Config
|  |__HelloWorld.config
|
|__processors
|  |__AdjustMessageColor.cs
|  |__LogMessageToConsole.cs
|
|__HelloWorld_Arguments.cs
|__HelloWorld_Processor.cs
|__HelloWorld_Messages.cs
|__HelloWorld_Executor.cs

* - (note) underscore symbol is added to this example for better visual perception. 

This generator adds a config file which will represent a pipeline in terms of sitecore.

Options

The program allows you to pass additional options to your generator. This can simplify pipeline generation flow and allow you to skip some questions (note: if you don't provide any of the options which are required by the flow, yeoman generator will ask you to provide them interactively).

|Name|Type|Description| |:--:|:--:|:---------:| |project-name|{String}|Name of the generator to use, like: cs - represents C# generator, ts - represents Typescript generator, csp - C# generator with Pipelines.Net library or sc - Sitecore generator| |program-flow|{String}|createCommonFiles - to create a pipeline with processors or createProcessor - to create a single processor| |pipeline-name|{String}|Name of the generated pipeline| |processor-names|{String}|Processors generated in dedicated folder, separated by whitespace| |subfolder|{Switch}|This option specifies whether subfolder for the pipeline must be created, specifying --no-subfolder will create all files in the same folder where generator was called| |arguments-members|{String}|Separated by whitespace list of members, which will be created in arguments file as properties|

How to get started with Pipeline generator

  • Ensure that you've installed:
    • Node.js - great runtime, allowing to launch programs written on JavaScript;
    • Yeoman - awesome generator with a bunch of project scuffolding templates, that you have to look at;
  • Ensure that you have pipelines generator (on npm it was called generator-chain): npm install -g generator-chain
  • Run yo chain and generator will take you through a creation of your pipeline.