Brightspace / serverless-plugin-for-each

Serverless plugin that adds $forEach syntax to reduce code duplication and allow creating dynamic templates
Apache License 2.0
1 stars 5 forks source link

plugin order #38

Open AGiantSquid opened 1 year ago

AGiantSquid commented 1 year ago

Hello, I tried using this plugin in combination with serverless-plugin-ifelse. I tried ordering this plugin ahead of serverless-plugin-ifelse hoping that this plugin would run first. It looks like the ifelse plugin will always be called first, however, because it uses the "before:package:initialize" hook, while the for-each plugin uses the 'after:package:initialize' hook. When I changed the for-each hook to use before, I was able to get the ifelse and for-each plugin to run in the order I wanted.

Is there a good reason to leave the for-each hook at 'after:package:initialize' ? I can fork the project and change it for my own needs, but I'm thinking it might play nicer with other plugins if the hook is changed.

AntonBazhal commented 1 year ago

Hello, honestly I do not remember whether there was a reason. I can try playing with that in a couple of projects and see if it causes any issues.