not2secure4u
not2secure4u

Reputation: 39

Atom + Browser-sync not reloading

When I start the browser-sync in the local project folder (just html/css project) using the command:

browser-sync start --server --files "css/*.css"


This starts the website after the following output in the terminal:

[BS] Access URLs:
-------------------------------------
   Local: http://localhost:3000
External: http://192.168.1.13:3000
-------------------------------------
      UI: http://localhost:3001
 UI External: http://192.168.1.13:3001
-------------------------------------
[BS] Serving files from: ./
[BS] Watching files...


When I make changes to the CSS file in this folder nothing happens. When I manually reload the page via command-R the changes occur.

1) What can be causing this ?
EDIT: I have found a partial solution by type following command:

browser-sync start --server --files "*.html"

It now detects changes for index.html. Its not injecting updates from .css files, even when I type following command:

browser-sync start --server --files "*.html CSS/*.css"

My map structure is the following:

project X
   +-- CSS
       +-- normalize.css
       +-- styles.css
   +-- IMG
       +-- logo.jpg
   +-- pages
   +-- index.html

2) How can I also make the program listen to changes made in the index.html file ? EDIT: SOLVED

Upvotes: 0

Views: 1201

Answers (2)

not2secure4u
not2secure4u

Reputation: 39

So, I have found the solution for problem 1/2 was the following:

browser-sync start --server --files "*.html css/*.css"

All my folder names needed to be lowercase.

Upvotes: 0

ray
ray

Reputation: 27265

Re #2:

Have you tried adding *.html to the files to be watched?

$ browser-sync start --server --files "css/*.css, *.html"

http://www.browsersync.io/docs/command-line/#files-example

Upvotes: 1

Related Questions