"value":"\n <p><code>just<\/code> compared to <code>make<\/code> is something that was asked during my PHP London talk, and whilst they are similar, <code>just<\/code> has differences for me that explains why I use it:<\/p>\n\n<h2 id=\"tabs-or-spaces\">Tabs or spaces<\/h2>\n\n<p>A Makefile needs to use tabs. Justfiles are more flexible and work with tabs or any number of spaces.<\/p>\n\n<h2 id=\".phony\">.PHONY<\/h2>\n\n<p>With a Makefile, you need to declare some targets as \"phony\". I believe that this is for targets that don't generate artifact files with that name, so as I'm not compiling and building files with <code>make<\/code>, this is redundant and adds visual noise.<\/p>\n\n<h2 id=\"passing-arguments\">Passing arguments<\/h2>\n\n<p>This is how a <code>composer<\/code> target looks like in a Makefile:<\/p>\n\n<pre><code class=\"make\">composer:\n docker compose exec php composer\n<\/code><\/pre>\n\n<p>With this, I'd expect to be able to pass arguments to it - e.g. <code>make composer info drupal\/core<\/code>.<\/p>\n\n<p>But, instead of seeing the expected output, I get an error: <code>make: *** No rule to make target 'info'. \u00a0Stop.<\/code>.<\/p>\n\n<p>This is what I'd need to do to pass arguments to the <code>composer<\/code> target:<\/p>\n\n<pre><code class=\"make\">composer:\n docker compose exec php composer $(COMPOSER_ARGS)\n<\/code><\/pre>\n\n<p>Now I can run <code>make composer COMPOSER_ARGS=\"info drupal\/core\"<\/code> and see what I was expecting but the syntax isn't what I'd want.<\/p>\n\n<p><code>just<\/code>, on the other hand, allows for defining parameters to its recipes:<\/p>\n\n<pre><code class=\"language-yaml\">composer *args:\n\u00a0 docker compose exec php composer \n<\/code><\/pre>\n\n<p>Here, I can create as many named parameters as needed and use them in the recipe with the syntax that I wanted - <code>just composer info drupal\/core<\/code>.<\/p>\n\n<p>I can think of a few others but this is is the main reason why I moved from <code>make<\/code> and later adopted <code>just<\/code>.<\/p>\n\n<p><code>just<\/code>, for me, gives the flexibilty that I need whilst using a simple and familiar syntax but without some of the confusing and complicated behaviours of <code>make<\/code>.<\/p>\n\n ",
"format":"full_html",
"processed":"\n <p><code>just<\/code> compared to <code>make<\/code> is something that was asked during my PHP London talk, and whilst they are similar, <code>just<\/code> has differences for me that explains why I use it:<\/p>\n\n<h2 id=\"tabs-or-spaces\">Tabs or spaces<\/h2>\n\n<p>A Makefile needs to use tabs. Justfiles are more flexible and work with tabs or any number of spaces.<\/p>\n\n<h2 id=\".phony\">.PHONY<\/h2>\n\n<p>With a Makefile, you need to declare some targets as \"phony\". I believe that this is for targets that don't generate artifact files with that name, so as I'm not compiling and building files with <code>make<\/code>, this is redundant and adds visual noise.<\/p>\n\n<h2 id=\"passing-arguments\">Passing arguments<\/h2>\n\n<p>This is how a <code>composer<\/code> target looks like in a Makefile:<\/p>\n\n<pre><code class=\"make\">composer:\n docker compose exec php composer\n<\/code><\/pre>\n\n<p>With this, I'd expect to be able to pass arguments to it - e.g. <code>make composer info drupal\/core<\/code>.<\/p>\n\n<p>But, instead of seeing the expected output, I get an error: <code>make: *** No rule to make target 'info'. Stop.<\/code>.<\/p>\n\n<p>This is what I'd need to do to pass arguments to the <code>composer<\/code> target:<\/p>\n\n<pre><code class=\"make\">composer:\n docker compose exec php composer $(COMPOSER_ARGS)\n<\/code><\/pre>\n\n<p>Now I can run <code>make composer COMPOSER_ARGS=\"info drupal\/core\"<\/code> and see what I was expecting but the syntax isn't what I'd want.<\/p>\n\n<p><code>just<\/code>, on the other hand, allows for defining parameters to its recipes:<\/p>\n\n<pre><code class=\"language-yaml\">composer *args:\n docker compose exec php composer \n<\/code><\/pre>\n\n<p>Here, I can create as many named parameters as needed and use them in the recipe with the syntax that I wanted - <code>just composer info drupal\/core<\/code>.<\/p>\n\n<p>I can think of a few others but this is is the main reason why I moved from <code>make<\/code> and later adopted <code>just<\/code>.<\/p>\n\n<p><code>just<\/code>, for me, gives the flexibilty that I need whilst using a simple and familiar syntax but without some of the confusing and complicated behaviours of <code>make<\/code>.<\/p>\n\n ",