browser-sync


What's the equivalent bs-config.js (Browsersync) of this command?


Browsersync is working fine with a PHP/Symfony 3 project with the following command:
browser-sync start --proxy http://localhost:8000 --files "web/css/**/*.css"
The browser will open at http://localhost:3000 and if I change something in web/css I can see the updated stylesheets without a full page reload. So far so good.
However it doesn't work with the following bs-config.js:
module.exports = {
"files": [
"web/css/**/*.css"
],
"server": false,
"proxy": "http://localhost:8000"
};
And the command:
browser-sync start
Browser will not load, changes aren't detected and reloading doesn't work. What I'm missing?
try this:
1º Create "bs-config.js" with: browser-sync init
2º Open file and edit like this:
module.exports = {
"ui": {
"port": 3001,
"weinre": {
"port": 8080
}
},
"files": "web/css/**/*.css",
"watchOptions": {},
"server": false,
"proxy": "http://localhost:8000",
"port": 3000,
"middleware": false,
"serveStatic": [],
"ghostMode": {
"clicks": true,
"scroll": true,
"forms": {
"submit": true,
"inputs": true,
"toggles": true
}
},
"logLevel": "info",
"logPrefix": "BS",
"logConnections": false,
"logFileChanges": true,
"logSnippet": true,
"rewriteRules": [],
"open": "local",
"browser": "default",
"cors": false,
"xip": false,
"hostnameSuffix": false,
"reloadOnRestart": false,
"notify": true,
"scrollProportionally": true,
"scrollThrottle": 0,
"scrollRestoreTechnique": "window.name",
"scrollElements": [],
"scrollElementMapping": [],
"reloadDelay": 0,
"reloadDebounce": 0,
"reloadThrottle": 0,
"plugins": [],
"injectChanges": true,
"startPath": null,
"minify": true,
"host": null,
"localOnly": false,
"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"
}};
3º Run the server: php -S localhost:8000
4º Start BrowserSync: browser-sync start --config bs-config.js

Related Links

Is it possible to open for example facebook.com page in browsersync?
Connect-gzip-static doesn't pick up html in firefox
Is it safe to include localhost into your connect-src for CSP?
Quit Browser-sync from terminal
lite-serverbs-config.js: middleware and array of folders
Make BrowserSync use the real https URL
Can we use browser sync on external url
How to replace .html with forward slash in BrowserSync?
Error during instillation of browser sync
When using browser-sync,why is the browser saying cannot get, while everything seems fine
How to sync the actions performed on webpage using Browsersync?
lite-server, BrowserSync: setting other URL path than /
Gulp and Browsersync injecting CSS but causing a full reload
Browser-sync - serve “node_modules” out of “src” directory
[browser-sync]browser-sync proxy can't connect to Rails Application
Browserstack not serving index.html by default

Categories

HOME
shell
fabricjs
turing-machines
spark-streaming
polymer
android-studio-2.2
formal-languages
angular-formly
hessian
can
google-apps
rds
permissions
mvc5
angularfire2
vert.x
nstableheaderview
minecraft-forge
stellar.js
bitnami
esoteric-languages
android-7.0-nougat
mapstruct
bourbon
boost-icl
question2answer
interpreter
jquery-callback
google-cloud-print
fragment-backstack
amazon-quicksight
handler
paperjs
browser-sync
dotspatial
recurring-events
kodi
jett
dsx-desktop
searchkit
openerp-7
watchman
protein-database
loading
postgresql-8.4
monkey-testing
plan-9
mesosphere
lampp
jquery-ui-draggable
vugen
convex-optimization
reindex
pair-programming
static-cast
subnet
cup
janus
mouseleave
ampps
pocketsphinx-android
restore
mapxtreme
flex-monkey
resourcemanager
greatest-n-per-group
x-tag
php-socket
createprocess
exim4
jparsec
decimalformat
opl
grgit
toolkit
eoferror
mirror
pyobjc
zxspectrum
adehabitathr
dbaccess
metatrader5
kissfft
grails-domain-class
lnk
wxformbuilder
memset
dot42
menubar
conditionaltagsupport
high-resolution
gwt-openlayers
bin
eclipse-kepler
route-provider
qi4j
uimanageddocument
infobright
htdocs
cloudfiles
uideviceorientation
hbm2java
pos-for-.net
scrubyt
linfu-dynamicproxy
httpcookie
lemmatization

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App