在 vanilla Laravel Spark 安装中,运行 gulp 大约需要 20 秒。这是我的日志:
[15:05:48] 开始“所有”...
[15:05:48] 开始“少”...
[15:05:53] 4.74 秒后完成“少”
[15:05:53] 开始'webpack'...
[15:05:58]
[15:05:58] 5.28 秒后完成“webpack”
[15:05:58] 开始“复制”...
[15:05:59] 486 毫秒后完成“复制”
[15:05:59] 开始“复制”...
[15:05:59] 17 毫秒后完成“复制”
[15:05:59] 开始“少”...
[15:05:59] 159 毫秒后完成“少”
[15:05:59] 开始'版本'......
[15:05:59] 517 毫秒后完成“版本”
[15:05:59] 11 秒后完成“全部”
[15:05:59] 开始“默认”...
我的 gulpfile:
var elixir = require('laravel-elixir');
var path = require('path');
require('laravel-elixir-vue-2');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
|
*/
elixir(function (mix) {
mix.less('app.less')
.webpack('app.js', null, null, {
resolve: {
modules: [
path.resolve(__dirname, 'vendor/laravel/spark/resources/assets/js'),
'node_modules'
]
}
})
.copy('node_modules/sweetalert/dist/sweetalert.min.js', 'public/js/sweetalert.min.js')
.copy('node_modules/sweetalert/dist/sweetalert.css', 'public/css/sweetalert.css');
mix.less('/brand/brand.less');
mix.version(['css/brand.css', 'css/app.css', 'js/app.js']);
我在运行代客的 Mac Mini 上使用最新版本的 gulp 和 gulp CLI。我该怎么做才能使这个运行更快?20 秒似乎太长了。