我试图改变我从这里借来的任务转轮脚本; 在Visual Studio 2015的Task Runner Explorer中成功执行任务运行程序后,实际上并未复制文件.
这是改变的脚本:
///"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)); }); });
任务运行器似乎在Visual Studio 2015 Enterprise中没有错误地运行,但之后我的wwwroot/js或wwwroot/css中没有文件?
这是文件结构:
我做错了什么,如何解决这个问题?任何和所有的帮助非常感谢!
轻微疏忽......不幸的是gulp默默地创建目录webroot并将文件复制到其中,它应该是wwwroot.哎呀!
///"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('./wwwroot/' + type)); }); });
:冲床: