我在运行 gulp 时使用了 gulp 和 Laravel Blade,
我要东西吗?
我想要 {{asset('/') }} 附加到 perfix URL build
head-include.blade.php 在运行 gulp之前
<!-- build:css resources/assets/css/out.css -->
<link rel="stylesheet" href="resources/assets/css/1.css">
<link rel="stylesheet" href="resources/assets/css/2.css">
<!-- endbuild -->
gulpfiles.js
...
gulp.task('useref', function(){
return gulp.src(paths.assets.html)
.pipe(useref())
.pipe(gulpIf('*.js', uglify()))
.pipe(gulpIf('*.css', cssnano()))
.pipe(gulp.dest(paths.dev.html))
});
...
head-include.blade.php 运行 gulp后
<link rel="stylesheet" href="resources/assets/css/out.css">
但我想要它:
我想 {{asset('/') }} 附加到 perfix url build
head-include.blade.php我想要..
<link rel="stylesheet" href="{{ asset('/') }} resources/assets/css/out.css">