Search code examples
composer-phpnunjucks

Mozilla Nunjucks composer package


Is it possible to include Nunjucks in a project with Composer?

Or do I have to download it manually?


Solution

  • No, you cannot install it via Composer, as it is a PHP dependency manager, used almost exclusively for PHP packages (which Nunjucks is obviously not). It's not impossible for non-PHP packages to be installable via Composer, but that's a rare occasion.
    As a general rule of thumb, to check Composer availability - look at the source code repository and see if a file named composer.json exists.

    But that doesn't mean you have to download it by hand, as there's an equivalent solution for JavaScript packages - NPM; and Mozilla have made it available there.