Skip to content

Instantly share code, notes, and snippets.

@bymathias
Created November 7, 2015 15:32
Show Gist options
  • Save bymathias/79863a97fcbc0d83c8a3 to your computer and use it in GitHub Desktop.
Save bymathias/79863a97fcbc0d83c8a3 to your computer and use it in GitHub Desktop.
/* bs-config.js | Launches development server or proxy */
'use strict';
var path = require('path');
// var env = process.env.NODE_ENV || 'development';
// var moment = require('moment');
// var now = moment(new Date());
var titleCase = require('title-case');
var pkg = require('./package');
var dirs = pkg.root;
/* ----------------------------------- *\
BrowserSync settings
\* ----------------------------------- */
var browsersyncConfig = {
// ui: {
// port: 3001,
// weinre: {
// port: 8080
// }
// },
// Watch your files as you work
// files: false,
files: path.resolve(__dirname, dirs.out, '**'),
// watchOptions: {},
// Use the built-in static server
// server: false,
server: {
baseDir: path.resolve(__dirname, dirs.out)
},
// OR
// proxy: false,
// proxy: 'local.dev',
// port: 3000,
// middleware: false,
// serveStatic: [],
// ghostMode: {
// clicks: true,
// scroll: true,
// forms: {
// submit: true,
// inputs: true,
// toggles: true
// }
// },
// Show additional info about the process
// logLevel: 'info',
logLevel: 'debug',
// Console logging prefix
// logPrefix: 'BS',
logPrefix: titleCase(pkg.name),
// logConnections: false,
// logFileChanges: true,
// logSnippet: true,
// rewriteRules: false,
// Open the user-interface
open: 'local',
// open: 'ui',
// Open the site in the following browsers
// browser: 'default',
browser: [
// 'safari',
// 'firefox',
// 'google chrome',
'google chrome canary'
],
// xip: false,
// hostnameSuffix: false,
// reloadOnRestart: false,
// notify: true,
// scrollProportionally: true,
// scrollThrottle: 0,
// scrollRestoreTechnique: 'window.name',
// scrollElements: [],
// scrollElementMapping: [],
// reloadDelay: 0,
// reloadDebounce: 0,
// plugins: [],
// injectChanges: true,
// Open the first browser window at URL + "/styleguide.html"
// startPath: null,
startPath: '/styleguide.html',
// Whether to minify client script, or not
// minify: true,
minify: false,
// host: null,
// codeSync: true,
// timestamps: true,
// clientEvents: [
// 'scroll',
// 'scroll:element',
// 'input:text',
// 'input:toggles',
// 'form:submit',
// 'form:reset',
// 'click'
// ],
// socket: {
// socketIoOptions: {
// log: false
// },
// 'socketIoClientConfig': {
// reconnectionAttempts: 50
// },
// path: '/browser-sync/socket.io',
// clientPath: '/browser-sync',
// namespace: '/browser-sync',
// clients: {
// heartbeatTimeout: 5000
// }
// },
// tagNames: {
// less: 'link',
// scss: 'link',
// css: 'link',
// jpg: 'img',
// jpeg: 'img',
// png: 'img',
// svg: 'img',
// gif: 'img',
// js: 'script'
// }
}; // end of browsersyncConfig
module.exports = browsersyncConfig;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment