我第一次和Laravel一起工作。我习惯使用gulp,我通常在gulpfile中使用手动方法。我想用laravel-elixir转换它,但我迷失了以下问题:
代码的例子: //需要 var gulp = require('gulp');
// Include plugins
var less = require('gulp-less');
var util = require('gulp-util');
var gulpif = require('gulp-if');
var concat = require('gulp-concat');
var minifycss = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var watch = require('gulp-watch');
var rev = require('gulp-rev');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var elixir = require('laravel-elixir');
// Styles LESS
gulp.task('styles', function () {
return gulp.src([
'vendor/bower_components/one/less/one.less',
'vendor/bower_components/two/css/two.css',
'resources/assets/less/app.less'
])
.pipe(gulpif(/[.]less/, less()))
.pipe(autoprefixer())
.pipe(concat('style.css'))
.pipe(gulpif(elixir.config.production == true, minifycss({keepBreaks:false,keepSpecialComments:0})))
.pipe(rev())
.pipe(gulp.dest('public/css/'));
});
gulp.task('serve', function() {
browserSync({
proxy: {
target: "local.dev"
},
open: false
});
gulp.watch(['resources/assets/less/**/*.less'], ['styles']).on('change', reload);
});
gulp.task('default', ['styles', 'serve']);
如何使用Elixir翻译此文件。我已经
了