-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
server.js
37 lines (36 loc) · 826 Bytes
/
server.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
// Dependencies
// =============================================================================
const browserSync = require('browser-sync').create();
browserSync.init({
files: [
'./dist/**/*.*',
'./docs/**/*.*'
],
ghostMode: {
clicks: false,
forms : false,
scroll: false
},
open: false,
notify: false,
cors: true,
reloadDebounce: 1000,
reloadOnRestart: true,
server: {
baseDir: [
'./docs/'
],
routes: {
'/dist': './dist/',
'/src': './src/',
'/CHANGELOG.md': './CHANGELOG.md'
}
},
rewriteRules: [
// Replace CDN URLs with local paths
{
match : /https?.*\/CHANGELOG.md/g,
replace: '/CHANGELOG.md'
}
]
});