@ilabdev/browsersync
v1.0.0
Published
Gulp tasks for syncing the browser with file changes
Downloads
1
Maintainers
Readme
@ilabdev/browsersync
Gulp tasks for syncing the browser with file changes
Installation & set up
Install @ilabdev/browsersync
npm install @ilabdev/browsersync --save-dev
-- OR --
yarn add @ilabdev/browsersync --dev
Include @ilabdev/browsersync
in your gulpfile.js
NOTE: Make sure you pass gulp
through to the package as shown below. The package sets up gulp tasks and will need it passed through to work.
require( '@ilabdev/browsersync' )( gulp )
Add the content from config.sample.js
to your .gulpconfig.js
and adjust as appropriate
module.exports = {
// Other configs here...
browsersync: {
watch: true,
logColor: 'cyan',
browsersync: {
server: {
baseDir: './',
},
ui: false,
files: [
'**/*',
],
ghostmode: false,
open: false,
notify: true,
watch: true,
},
},
// Other configs here...
}
Run gulp browsersync
to run the task, or add the task as a script and run that with npm
or yarn
Config
watch
Type: boolean
Whether to sync the browser with file changes or not
loggerColor
Type: string
The logger color to use for any output text. See https://github.com/stgdp/fancy-logger#available-modifiers for colors that can be used
browsersync
Type: object
Options to be passed through to browsersync
. See https://browsersync.io/docs/options for more information