synesthesia-it / Murray

Easily add features to your projects by scaffolding new files with Stencil templates
MIT License
55 stars 2 forks source link

[Feature] Defines internal placeholders for current item / procedures to be consumed from plugins. #45

Closed stefanomondino closed 1 year ago

stefanomondino commented 4 years ago

As of today, Plugins defines custom implementations to be run before or after each item/procedure resolution.

This gives Murray developers a great control over how they implement each plugin, but lacks of control for Murray users when they want to use plugin details with some kind of context over current element being processed.

Lets take the Shell plugin used in an "after item replacement" phase. it's easy to add a command like echo Hello after each replacement, but what if a user wants to echo current Item destination path or something similar?

Murray Plugins should inject in provided context some special variable like _inputPath or _outputPath with current input properties, so that the plugin section of a BoneItem can contain something like echo {{_inputPath}}, with complete control over shell commands configurations.

List of possible values: