-
Notifications
You must be signed in to change notification settings - Fork 1
/
bs.js
executable file
·50 lines (47 loc) · 1.41 KB
/
bs.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
var browserSync = require('browser-sync');
var domain = "http://localhost:6677/";
browserSync({
proxy: domain,
logLevel: "debug",
logConnections: true,
files: ['dist/**/*.css', 'dist/**/*.js'],
// serveStatic: [{
// route: '/wp-content/themes/tailwindcss/dist/',
// dir: 'dist'
// }],
serveStatic: ['./dist/'],
port: 10111,
// reloadDelay: 1000, //remove or lower this is you are on mac
rewriteRules: [
{
match: new RegExp('/wp-content/themes/tailwindcss/dist/admin.css'),
fn: function () {
return '/admin.css';
}
},
{
match: new RegExp('/wp-content/themes/tailwindcss/dist/admin-vendor.css'),
fn: function () {
return '/admin-vendor.css';
}
},
{
match: new RegExp('/wp-content/themes/tailwindcss/dist/main.css'),
fn: function () {
return '/main.css';
}
},
{
match: new RegExp('/wp-content/themes/tailwindcss/dist/vemdor.css'),
fn: function () {
return '/vemdor.css';
}
},
{
match: new RegExp('/wp-content/themes/tailwindcss/dist/bundle.js'),
fn: function () {
return '/bundle.js';
}
}
]
});