Answer the question
In order to leave comments, you need to log in
How to transfer files using gulp build?
There is a project structure like this:
├── app
├── css
├── js
├── index.html
├── .htaccess
├── sitemap.xsl
├── ...
├── dist
├── css
├── js
├── index.html
├── gulpfile.js
├── package.json
...
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
to dist
, except for files like .htaccess, sitemap.xsl, readme.md, ... ├── app
├── css
├── js
├── index.html
├── .htaccess
├── sitemap.xsl
├── ...
├── dist
├── css
├── js
├── index.html
├── .htaccess
├── sitemap.xsl
├── ...
├── gulpfile.js
├── package.json
Answer the question
In order to leave comments, you need to log in
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));
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question