为什么将 npm 与 laravel 一起使用?

Why use npm with laravel?

由于 npm 是节点的包管理器,我经常看到它与 laravel 样板项目一起使用,但我不知道为什么?

例如,此laravel-5-boilerplate指示在安装项目的步骤中npm install..

也可以找到将 npm 与 laravel..

一起使用的其他示例

有人可以给我解释一下吗?

现在 npm 包含用于处理各种前端任务的通用工具。因此,从中获取一些包非常有用。在 laravel 的情况下,有两个实用程序,它使用:

gulp - 用于连接、缩小 css、js 代码的流式构建工具。

laravel-elixir - is wrapper for gulp, written by Jeffrey Way, who is doing laracasts for us. It's place where you can found out more about this this tool in particular and in common.

如果你只使用标准js/css,你可以跳过这一步。

Blockquote

I made that boilerplate. That command is specific to download the dependencies for the Laravel Elixir package (http://laravel.com/docs/5.0/elixir) But has many, many uses outside that.

Elixir 文档解释得很好。