bower - Gulp copy in VS 2015 not copying files -
visual studio 2015 asp.net 5 template, starts gulpfile.js , several installed bower components. i've added additional bower components (angularjs) , copied wwwroot\lib folder expected. i've added 1 of own libraries folder i've called ext_modules\dist. adding task gulpfile.js copy files (containing single .js , .css file) wwwroot\lib folder well. i'm following example syntax present in gulpfile.js. however, nothing ever copied ext_modules folder. please see js below, output, , folder structure.
/// <binding clean='clean' /> var gulp = require("gulp"), rimraf = require("rimraf"), fs = require("fs"); eval("var project = " + fs.readfilesync("./project.json")); var paths = { bower: "./bower_components/", extmodules: "./ext_modules/", lib: "./" + project.webroot + "/lib/" }; gulp.task("clean", function (cb) { rimraf(paths.lib, cb); }); gulp.task("copy", ["clean"], function () { var bower = { "angular": "angular.js/*.js", "bootstrap": "bootstrap/dist/**/*.{js,map,css,ttf,svg,woff,eot}", "bootstrap-touch-carousel": "bootstrap-touch-carousel/dist/**/*.{js,css}", "hammer.js": "hammer.js/hammer*.{js,map}", "jquery": "jquery/jquery*.{js,map}", "jquery-validation": "jquery-validation/jquery.validate.js", "jquery-validation-unobtrusive": "jquery-validation-unobtrusive/jquery.validate.unobtrusive.js", }; var extmodules = { "ext-modules": "dist/*.{js,map,css,ttf,svg,woff,eot}" }; (var module in bower) { /* copy works fine*/ console.log("source: " + paths.bower + bower[module]); console.log("destination: " + paths.lib + module); gulp.src(paths.bower + bower[module]) .pipe(gulp.dest(paths.lib + module)); }; (var module in extmodules) { /* not copy files */ console.log("source: " + paths.extmodules + extmodules[module]); console.log("destination: " + paths.lib + module); gulp.src(paths.extmodules + extmodules[module]) .pipe(gulp.dest(paths.lib + module)); }; });
here console log:
[11:17:57] starting 'clean'... [11:17:57] finished 'clean' after 11 ms [11:17:57] starting 'copy'... source: ./bower_components/angular.js/*.js destination: ./wwwroot/lib/angular source: ./bower_components/bootstrap/dist/**/*.{js,map,css,ttf,svg,woff,eot} destination: ./wwwroot/lib/bootstrap source: ./bower_components/bootstrap-touch-carousel/dist/**/*.{js,css} destination: ./wwwroot/lib/bootstrap-touch-carousel source: ./bower_components/hammer.js/hammer*.{js,map} destination: ./wwwroot/lib/hammer.js source: ./bower_components/jquery/jquery*.{js,map} destination: ./wwwroot/lib/jquery source: ./bower_components/jquery-validation/jquery.validate.js destination: ./wwwroot/lib/jquery-validation source: ./bower_components/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js destination: ./wwwroot/lib/jquery-validation-unobtrusive source: ./ext_modules/dist/*.{js,map,css,ttf,svg,woff,eot} destination: ./wwwroot/lib/ext-modules [11:17:57] finished 'copy' after 21 ms process terminated code 0.
i can work if explicitly right mouse on gulpfile.js , select "task runner explorer" window shows docked bottom. in tasks list of tasks. can right mouse on task want run , select "run".
Comments
Post a Comment