cari

Rumah  >  Soal Jawab  >  teks badan

gulp - tugas sambungan laravel Elixir tidak sah

Tolong bantu saya mengetahui apa yang salah?

/**
 * resouces/assets/app文件夹内的每一个js都压缩并保存到public/app
 * Created by summer on 2017/3/1.
 */


var gulp = require('gulp');

var gulpIf = require('gulp-if');

var uglify = require('gulp-uglify');

var elixir = require('laravel-elixir');

elixir.extend('appJs', function (src, output) {

    var inputFilePath = src || '/resources/assets/app/';
    var outputFilePath = output || '/public/app/';


    new elixir.Task('appJs', function () {
        return gulp.src(inputFilePath + '/**/*.js')
            .pipe(gulpIf(elixir.config.production, uglify()))
            .pipe(gulp.dest(outputFilePath));
    })
});
G:\xampp\htdocs\orderManage>gulp appJs
[09:32:05] Using gulpfile G:\xampp\htdocs\orderManage\gulpfile.js
[09:32:05] Starting 'appJs'...
[09:32:05] Finished 'appJs' after 11 ms

Ia dipaparkan dalam konsol, appJs是执行了的,/public/app/Apa masalahnya jika tiada apa-apa...

为情所困为情所困2797 hari yang lalu331

membalas semua(1)saya akan balas

  • PHPz

    PHPz2017-05-16 16:49:39

    Baiklah, ya

    var inputFilePath = src || '/resources/assets/app/';
        var outputFilePath = output || '/public/app/';

    Jika anda mempunyai sebarang soalan, tambahkan .或直接去掉/

    di hadapannya
    var inputFilePath = src || './resources/assets/app/';
        var outputFilePath = output || './public/app/';

    balas
    0
  • Batalbalas