gnormal / gnorm

A database-first code generator for any language
https://gnorm.org
Other
487 stars 40 forks source link

Add support for template plugin #35

Closed gernest closed 6 years ago

gernest commented 6 years ago

This is implementation of the templates functions plugins based on the discussion on the slack channel.

The design is based on json.

A plugin is a binary/executable that accepts one argument , the name of the function to invoke. The context/payload is written to the stdin of the running plugin command in json format.

The json payload has format { "data" : SOME_VALUE } where SOME_VALUE is any valid json object.

The plugin runner expect the plugin to write to stdout the output after processing the payload, the format of the json output is the same as json input.

TODO:

gernest commented 6 years ago

@natefinch please take a look if you get time. I think the PR is complete!

natefinch commented 6 years ago

Awesome. Thanks!

On Thu, Sep 21, 2017, 7:08 AM Geofrey Ernest notifications@github.com wrote:

@natefinch https://github.com/natefinch please take a look if you get time. I think the PR is complete!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gnormal/gnorm/pull/35#issuecomment-331125547, or mute the thread https://github.com/notifications/unsubscribe-auth/ADCcyKcbvwkh6hSgUokslr7CcllapIClks5skkOvgaJpZM4Pd-aY .

gernest commented 6 years ago

Done , awaiting #41 to do further tests.

gernest commented 6 years ago

@natefinch I have tested with #42 the relative paths works like a charm, same to absolute paths. I hope I addressed all requested changes.

gernest commented 6 years ago

Ping

natefinch commented 6 years ago

3 tiny docs changes and we're good! :)

gernest commented 6 years ago

Done

natefinch commented 6 years ago

This is really really awesome work. I just tried it out locally. It's so cool. Thanks for all your work on this!