Home > Backend Development > PHP Tutorial > Laravel Elixir怎么安装

Laravel Elixir怎么安装

PHPz
Release: 2020-09-04 15:06:33
Original
1451 people have browsed it

安装Laravel Elixir的方法:首先安装“node.js”;然后安装Gulp作为全局NPM包;接着使用命令“npm install”安装需要的依赖;最后配置根目录下的“gulpfile.js”即可。

Laravel Elixir怎么安装

Laravel Elixir怎么安装?

Elixir安装和设置

1.安装node.js

2.安装Gulp 作为全局NPM 包

npm install --global gulp
Copy after login

3.最后,在新安装的Laravel 根目录下,你会发现有一个package.json 文件。该文件和composer.json 一样,只不过是用来定义Node 依赖而非PHP ,你可以通过运行如下命令来安装需要的依赖:

npm install
Copy after login

windows下:

npm install --no-bin-links
Copy after login

4.按需配置根目录下的gulpfile.js

常用命令  

1.生成文件

gulp
Copy after login

2.最小化CSS 和JavaScript 文件

gulp --production
Copy after login

3.自动监控资源改变

gulp watch
gulp watch --production
Copy after login
Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template