I figured out a way to do this, although I don't really like it. I will be happy to accept the best answer.
In the gulpfile.js project, the first line is a comment "
Intercepts a Visual Studio Clean event and binds a Clean Gulp task to it. You can connect to other events, for example. After Build I associated it with a task that uses gulp-bower to restore components.
gulpfile.js
/// <binding Clean='clean' AfterBuild='after_build'/> var gulp = require("gulp"), bower = require('gulp-bower'); ... gulp.task("after_build", function() { return bower() .pipe(gulp.dest(paths.webroot + 'lib/')); });
You can see the bindings in Task Runner Explorer : 
This decision seems rather awkward. I would prefer kpm to do the job.
EDIT
In fact, there is no need to restore packages during assembly. They are restored when the project is opened in VS. However, I do not know what will happen when you update your sources from the code repository.
gisek source share