-
Notifications
You must be signed in to change notification settings - Fork 0
/
bs-config.js
156 lines (146 loc) · 4.76 KB
/
bs-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/*
|--------------------------------------------------------------------------
| Browser-sync config file
|--------------------------------------------------------------------------
|
| Please report any issues you encounter:
| https://github.com/shakyShane/browser-sync/issues
|
*/
module.exports = {
/*
|--------------------------------------------------------------------------
| Files
|--------------------------------------------------------------------------
|
| Here you can specify which files should be watched for changes.
| Below are a few examples of accepted patterns.
| For more information check: https://github.com/isaacs/minimatch
|
*/
// Examples:
// files: "css/*.css",
// files: ["css/*.css", "css/**/*.css"],
// files: ["css/*.css", "app/*.html"],
files: ["browser/style/**/*.css", "browser/script/**/*.js", "public/**/*.jade"],
/*
|--------------------------------------------------------------------------
| Host
|--------------------------------------------------------------------------
|
| Browser-sync will auto detect a suitable IP to be used, if that doesn't work, or
| if you already know which IP to use - you can specify it here.
|
| host: "192.168.0.4"
|
*/
host: null,
/*
|--------------------------------------------------------------------------
| Ghost Mode
|--------------------------------------------------------------------------
|
| Enable/disable individual ghostMode options.
|
*/
ghostMode: {
clickedLinks: false, // Allow click events on <a> elements (buggy, avoid if possible)
links: true,
forms: true,
scroll: true
},
/*
|--------------------------------------------------------------------------
| Server
|--------------------------------------------------------------------------
|
| Use the built-in server when working with static HTML files.
| Note: NOT to be used if you're using the proxy.
|
| server: {
| baseDir: "app"
| },
| server: {
| baseDir: "./"
| },
| server: {
| baseDir: "./",
| index: "index.htm"
| },
*/
server: false,
/*
|--------------------------------------------------------------------------
| Proxy
|--------------------------------------------------------------------------
|
| If you have an existing server setup, you can use the proxy to inject the snippets.
| Note: NOT to be used if you're using the built-in server.
|
| IP based proxy example.
| proxy: {
| host: "127.0.0.1",
| port: 8000
| }
|
| vhost based proxy example.
| proxy: {
| host: "local.dev",
| port: 8000,
| }
|
*/
proxy: {
host: "localhost",
port: 9000
},
/*
|--------------------------------------------------------------------------
| Open (true|false)
|--------------------------------------------------------------------------
|
| Should the browser be opened automatically?
|
*/
open: true,
/*
|--------------------------------------------------------------------------
| Timestamps (true|false)
|--------------------------------------------------------------------------
|
| Should timestamps be appended to injected files?
| (if you don't know why you would ever need to turn this off, then leave it on)
|
*/
timestamps: true,
/*
|--------------------------------------------------------------------------
| File Timeout (milliseconds)
|--------------------------------------------------------------------------
|
| If you're using a pre-processor (like SASS) & you find that the file watching is erratic,
| you can increase the amount of time to wait after a file changed here.
|
*/
fileTimeout: 1000,
/*
|--------------------------------------------------------------------------
| Scroll Throttle (milliseconds)
|--------------------------------------------------------------------------
|
| If you experience any problems with the scroll sync, you can throttle how quickly the events
| are sent. (0-200 works best)
|
*/
scrollThrottle: 0,
/*
|--------------------------------------------------------------------------
| Notify (true|false)
|--------------------------------------------------------------------------
|
| By default, Browser-Sync will flash a message in the browser when a file changes,
| you can turn it off here if you don't want it.
|
*/
notify: true
};