Tôi đang cố gắng thay đổi tập lệnh nhân viên nhiệm vụ mà tôi đã vay từ here, tuy nhiên; sau khi tác vụ thực hiện thành công trong Task Runner Explorer của Visual Studio 2015 - các tệp này không thực sự được sao chép.Visual Studio 2015 ASP.NET 5, công việc Gulp không sao chép tệp từ node_modules
Đây là kịch bản bị thay đổi:
/// <binding BeforeBuild='copy-assets' />
"use strict";
var _ = require('lodash'),
gulp = require('gulp');
gulp.task('copy-assets', function() {
var assets = {
js: [
'./node_modules/bootstrap/dist/js/bootstrap.js',
'./node_modules/systemjs/dist/system.src.js',
'./node_modules/angular2/bundles/angular2.dev.js',
'./node_modules/angular2/bundles/router.dev.js',
'./node_modules/angular2/bundles/angular2-polyfills.js',
'./node_modules/angular2/bundles/http.dev.js',
'./node_modules/rxjs/bundles/Rx.js',
'./node_modules/typescript/lib/typescript.js'
],
css: ['./node_modules/bootstrap/dist/css/bootstrap.css']
};
_(assets).forEach(function(assets, type) {
gulp.src(assets).pipe(gulp.dest('./webroot/' + type));
});
});
Nhiệm vụ Á hậu dường như chạy mà không có lỗi trong Visual Studio 2015 Enterprise, nhưng không có tập tin trong wwwroot của tôi/js hoặc wwwroot/css sau đó?
Dưới đây là cấu trúc file:
Tôi đang làm gì sai và làm thế nào để sửa lỗi này? Bất kỳ và tất cả giúp đỡ được nhiều đánh giá cao!