Skip to content

Commit 8a46d84

Browse files
authored
Restore package updates removed by last master merge commit (conflict) (#121)
1 parent efc9dc5 commit 8a46d84

File tree

3 files changed

+1672
-3392
lines changed

3 files changed

+1672
-3392
lines changed

.core/gulp.tasks.js

+21
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,29 @@ const reactium = (gulp, config, webpackConfig) => {
115115
console.log(`File ${e.event}: ${displaySrc} -> ${displayDest}`);
116116
};
117117

118+
const _opnWrapperMonkeyPatch = open =>
119+
function(url, name, bs) {
120+
const app = op.get(
121+
process.env,
122+
'BROWERSYNC_OPEN_BROWSER',
123+
'chrome',
124+
);
125+
let browser = open.apps.chrome;
126+
if (app in open.apps) browser = open.apps[app];
127+
128+
open(url, { app: { name: browser } }).catch(function(error) {
129+
bs.events.emit('browser:error');
130+
});
131+
};
132+
118133
const serve = ({ open } = { open: config.open }) => done => {
119134
const proxy = `localhost:${config.port.proxy}`;
135+
136+
// monkey-path opnWrapper for linux support
137+
const open = require('open');
138+
const utils = require('browser-sync/dist/utils');
139+
utils.opnWrapper = _opnWrapperMonkeyPatch(open);
140+
120141
axios.get(`http://${proxy}`).then(() => {
121142
browserSync({
122143
notify: false,

0 commit comments

Comments
 (0)