1. The app folder contains the working version of the project. The dist folder should contain the production version of the project. I do not quite understand why it is empty. Galp seems to have to compile all the files there.
  2. The gulp-rigger plugin does not work. The browser simply prints the string //=html_includes/footer.html. How to configure it?
    Explain, please.

gulpfile.js

var gulp = require('gulp'), sass = require('gulp-sass'), rigger = require('gulp-rigger'), browserSync = require('browser-sync'); gulp.task('sass', function(){ return gulp.src('app/sass/**/*.scss') .pipe(sass()) .pipe(gulp.dest('app/css')) .pipe(browserSync.reload({stream:true})) }); gulp.task('browser-sync', function(){ browserSync({ server: { baseDir: 'app' }, notify: false }) }); gulp.task('html', function(){ return gulp.src('app/html_includes/*.html') .pipe(rigger()) .pipe(gulp.dest('app/')) .pipe(browserSync.reload({stream:true})) }); gulp.task('watch', ['browser-sync', 'sass'], function(){ gulp.watch('app/sass/**/*.scss', ['sass']); gulp.watch('app/*.html', browserSync.reload); gulp.watch('app/js/**/*.js', browserSync.reload); }); 
package.json

 { "name": "project1", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "devDependencies": { "browser-sync": "^2.18.5", "gulp": "^3.9.1", "gulp-rigger": "^0.5.8", "gulp-sass": "^3.0.0" } } 
enter image description here

    1 answer 1

    • dist - from the word distributive , which in simple language means complete software, to which can be attributed the library, framework. That is, it is worth using a directory with the name dist if you are writing a library.

    • dest is from the word destination , which can be interpreted as a destination . It is worth using when you build the application.

    Specifically on the issue, it's all tritely simple, you yourself pointed out gulp.dest (where to put it) in the app directory. Fix it and the project will be compiled to the right place.

    • On the second question I can say the following .. There are many reasons. If you see the correct html file in the compiled form, then browserSync probably refreshes the page before the compilation takes place. - user220409