shakyShane / jekyll-gulp-sass-browser-sync

A starter project including full setup for Jekyll, GulpJS, SASS & BrowserSync
728 stars 169 forks source link

Try to add folder with htmls which I want to use with AJAX to the browsersync baseDir #60

Closed szymonhernik closed 7 years ago

szymonhernik commented 7 years ago

Hello, I want to add folder with html files which next I want to use with AJAX calls. The only thing I can do is adding these files directly to the project's folder (next to the index.html). I'm guessing I need to do sth with browserSync but I don't know how.

You can see in gulp task watch I've tried to add folder ajax with html files but I can't use them next with ajax call.

My gulpfile.js is:

var gulp = require('gulp'); var browserSync = require('browser-sync'); var sass = require('gulp-sass'); var prefix = require('gulp-autoprefixer'); var cp = require('child_process'); var pug = require('gulp-pug');

var jekyll = process.platform === 'win32' ? 'jekyll.bat' : 'jekyll'; var messages = { jekyllBuild: 'Running: $ jekyll build' };

/**

/**

/**

/**

/ I'm trying to Gulp stuff /

gulp.task('pug', function(){ return gulp.src('_pugfiles/*.pug') .pipe(pug()) .pipe(gulp.dest('_includes')); });

/**

/**