Skip to content
This repository was archived by the owner on Mar 31, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions gulp-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@
enabled: true,
baseDir: './',
startPath: 'pattern-lab/public/',
// Uncomment below if using a specific local url
// domain: 'emulsify.dev',
// Uncomment proxy and host below if using a specific local url.
// proxy: 'mysite.dev',
// host: 'mysite.dev',
notify: false,
openBrowserAtStart: false,
reloadOnRestart: true,
Expand Down
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,16 @@ module.exports = (gulp, config) => {
* Task for running browserSync.
*/
gulp.task('serve', ['css', 'scripts', 'watch:pl'], () => {
if (config.browserSync.domain) {
if (config.browserSync.proxy && config.browserSync.host) {
console.log('Using proxy and host!')
browserSync.init({
injectChanges: true,
open: config.browserSync.openBrowserAtStart,
proxy: config.browserSync.domain,
proxy: config.browserSync.proxy,
host: config.browserSync.host,
startPath: config.browserSync.startPath,
notify: config.browserSync.notify,
baseDir: config.browserSync.baseDir,
});
} else {
browserSync.init({
Expand Down