这是我的 gulpfile。我不知道这是怎么回事。因为它以前在我的另一个项目中工作过。是过时的东西还是什么?
var gulp = require('gulp');
var rename = require('gulp-rename');
var elixir = require('laravel-elixir');
gulp.task("copyfiles", function(){
// Copy jQuery, Bootstrap, and FontAwesome
gulp.src("vendor/bower_dl/jquery/dist/jquery.js")
.pipe(gulp.dest("resources/assets/js/"));
gulp.src("vendor/bower_dl/bootstrap/less/**")
.pipe(gulp.dest("resources/assets/less/bootstrap"));
gulp.src("vendor/bower_dl/bootstrap/dist/js/bootstrap.js")
.pipe(gulp.dest("resources/assets/js/"));
gulp.src("vendor/bower_dl/bootstrap/dist/fonts/**")
.pipe(gulp.dest("public/assets/fonts"));
gulp.src("vendor/bower_dl/fontawesome/less/**")
.pipe(gulp.dest("resources/assets/less/fontawesome"));
gulp.src("vendor/bower_dl/fontawesome/fonts/**")
.pipe(gulp.dest("public/assets/fonts"));
// Copy datatables
var dtDir = 'vendor/bower_dl/datatables-plugins/integration/';
gulp.src("vendor/bower_dl/datatables/media/js/jquery.dataTables.js")//-----
.pipe(gulp.dest('resources/assets/js/'));
gulp.src(dtDir + 'bootstrap/3/dataTables.bootstrap.css')
.pipe(rename('dataTables.bootstrap.less'))
.pipe(gulp.dest('resources/assets/less/others/'));//-----
gulp.src(dtDir + 'bootstrap/3/dataTables.bootstrap.js')
.pipe(gulp.dest('resources/assets/js/'));
});
/**
* Default gulp is to run this elixir stuff
*/
elixir(function(mix) {
// Combine scripts
mix.scripts([
'js/jquery.js',
'js/bootstrap.js',
'js/jquery.dataTables.js',
'js/dataTables.bootstrap.js'
],
'public/assets/js/admin.js',
'resources/assets'
);
// Compile Less
mix.less('admin.less', 'public/assets/css/admin.css');
});
我不知道为什么会这样。我正在按照教程进行操作