@senselessV7

Как с помощью gulp сборки перенести файлы?

Есть такая структура проекта:

├── app
         ├── css
         ├── js
         ├── index.html
         ├── .htaccess
         ├── sitemap.xsl
         ├── ...
├── dist   
         ├── css
         ├── js
         ├── index.html
├── gulpfile.js
├── package.json


gulpfile.js:
...
gulp.task('html', function(){
	gulp.src(path.app.html)
                 ... 
		.pipe(gulp.dest(path.dist.html));
});

gulp.task('css, function(){
	gulp.src(path.app.css)
                 ... 
		.pipe(gulp.dest(path.dist.css));
});

...


Все переносится как положено из app в dist, но кроме файлов типа .htaccess, sitemap.xsl, readme.md, ...

Как можно донастроить gulp, чтобы и эти файлы автоматически переносились?

Чтобы получилась такая структура:

├── app
         ├── css
         ├── js
         ├── index.html
         ├── .htaccess
         ├── sitemap.xsl
         ├── ...
├── dist   
         ├── css
         ├── js
         ├── index.html
         ├── .htaccess
         ├── sitemap.xsl
         ├── ...
├── gulpfile.js
├── package.json
  • Вопрос задан
  • 1264 просмотра
Решения вопроса 1
delphinpro
@delphinpro Куратор тега Gulp.js
frontend developer
gulp.task('mytask', function(){
  gulp.src('app/*.*')
      .pipe(gulp.dest('dist/'));
});

gulp.task('html', ['mytask'], function(){
  gulp.src(path.app.html)
                 ... 
    .pipe(gulp.dest(path.dist.html));
});
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы