javascript - Are Gulp Recipes an Anti-Pattern? -


I think most people will agree that copy and paste as a solution to reusability is an anti- Pattern is, therefore, not copying "Gulp Recipe" to amend the same thing or am I missing something?

no

This is an anti-pattern if you can not understand what you are copying.

Gulp is a process which means processing files using stream patterns, it's okay to repeat the code inside the job, but not if you are processing multiple and that processing code Repeat

The wand, on the other hand, is based on configuration, rather than replacing the code, you create and configure them in the tasks. These custom functions create internal repetitive functions, and you repeat many boilerplate codes to make a slightly different one.

I am not the best authority to answer about GLUP, but at least I understand that concept and difference between two build tools can finally be used by any recipe. But you have to understand the meaning and how it works.

Anti-pattern is a recipe, manually test, test, test, if it works, then it is thrown away. A good pattern code is read; If you can, follow your own; Otherwise copy, understand and modify what you have to do; If this fails, go down to reduce it and understand it, then it will not happen again.

An anti-pattern is putting your stomach instead of causes, due to your stomach.


Comments