Moqui Start Component

It’s a pain to setup a new component, and this does most of the steps for you.

If anyone is interested, I created this start component to easily create new moqui components: GitHub - acetousk/start: A simple component to start out with for Moqui Components

Just follow the instructions in the README to get started.

I’m open to any feedback or simple feature requests.

2 Likes

It would be helpful if we have a interactive gradle task, for example “gradle createComponent”.

1 Like

I wrote a similar thing for OFBiz: createPlugin. It’s easy to do thanks to groovy and GString. Essentially you can parameterize the component with a few parameters (default name, a few other args) which then generates a component based on these. And I think it would be great to have that feature in the core (either in the framework itself or maybe in runtime or something like that).

I can definitely write something like that if people find it useful. I might even base it on @michael work above.

1 Like

Yes, that’s greate!

1 Like

I can do that.

It’s pretty simple

I think that would be a great idea @michael people would most likely use that feature. I know I would.

Maybe you can even customize it like other starter templates to choose for example whether or not to use macros, or whether tests should be generated. Something similar to create-react-app or other starter generators.

1 Like

Good idea. I can do that

@taher and @zhangwei

I create a branch here that I would like you to test before merging.

Let me know what you think

I have tested it and it works well.
I also used --console=plain in command to hide gradle Executing/Progress bar and the interaction looks more friendly.
./gradlew -Pcomponent=my_component createComponent --console=plain

1 Like

Great! I’m glad it worked