- 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.
- 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); }); { "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" } } 