Merge pull request #90 from MouseEatsCat/master

Remove default proxy
This commit is contained in:
Chauncey McAskill
2021-09-16 13:38:24 -04:00
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'; import bs from 'browser-sync';
// Start the Browsersync server // Start the Browsersync server
bs.init({ let bsConfig = {
proxy: paths.url,
open: false, open: false,
notify: 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 // Build scripts, compile styles, concat vendors and generate the svgs sprite on first hit
buildScripts(); buildScripts();
@@ -31,7 +40,7 @@ bs.watch(
] ]
).on('change', bs.reload); ).on('change', bs.reload);
// Watch scripts // Watch scripts
bs.watch( bs.watch(
[ [
paths.scripts.src + '**/*.js' paths.scripts.src + '**/*.js'

View File

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