1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

Remove default proxy

This commit is contained in:
Michel Descoteaux
2021-06-28 21:33:10 -04:00
parent 72eaf582a5
commit 14d9f47fe0
2 changed files with 14 additions and 5 deletions

View File

@@ -8,11 +8,20 @@ import paths from '../mconfig.json';
import bs from 'browser-sync';
// Start the Browsersync server
bs.init({
proxy: paths.url,
let bsConfig = {
open: false,
notify: false
});
};
if (typeof paths.proxy === 'string' && paths.proxy.length > 0) {
// Use proxy
bsConfig.proxy = paths.proxy;
} else {
// Use base directory
bsConfig.server = { baseDir: paths.dest };
}
bs.init(bsConfig);
// Build scripts, compile styles, concat vendors and generate the svgs sprite on first hit
buildScripts();
@@ -31,7 +40,7 @@ bs.watch(
]
).on('change', bs.reload);
// Watch scripts
// Watch scripts
bs.watch(
[
paths.scripts.src + '**/*.js'

View File

@@ -1,5 +1,5 @@
{
"url": "locomotive-boilerplate.test",
"proxy": "",
"src": "./assets/",
"dest": "./www/",
"build": "./build/",