Skip to content

Commit

Permalink
fix .static with electron. closes #69
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed Dec 4, 2017
1 parent 2602ecc commit cf59fb0
Show file tree
Hide file tree
Showing 5 changed files with 5,642 additions and 3 deletions.
1 change: 0 additions & 1 deletion index.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ function runner (opts) {
var mockHandler = opts.mock && require(path.resolve('./', opts.mock)) var mockHandler = opts.mock && require(path.resolve('./', opts.mock))


var server = http.createServer(function (req, res) { var server = http.createServer(function (req, res) {

if (opts.input === 'javascript') { if (opts.input === 'javascript') {
if (/^\/bundle\.js/.test(req.url)) { if (/^\/bundle\.js/.test(req.url)) {
res.setHeader('content-type', 'application/javascript'); res.setHeader('content-type', 'application/javascript');
Expand Down
2 changes: 1 addition & 1 deletion lib/launch.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function(opts, cb){
var browser = Phantom(); var browser = Phantom();
browser.end('location = ' + JSON.stringify(opts.loc)); browser.end('location = ' + JSON.stringify(opts.loc));
process.nextTick(cb.bind(null, null, browser)); process.nextTick(cb.bind(null, null, browser));
} else if (/^electron/.test(opts.name)) { } else if (/^electron/.test(opts.name)) {
var browser = Electron(opts); var browser = Electron(opts);
if (opts.input === 'javascript') { if (opts.input === 'javascript') {
opts.bundle.createReadStream().pipe(browser); opts.bundle.createReadStream().pipe(browser);
Expand Down
Loading

0 comments on commit cf59fb0

Please sign in to comment.