easy-sauce icon indicating copy to clipboard operation
easy-sauce copied to clipboard

Allow setting the basePath

Open ericclemmons opened this issue 9 years ago • 3 comments

Currently, it's defaulted to ./ for ngrok.

The problem is, our test suite is built with Webpack (as the client-side app is) and put into /build alongisde /build/test/index.html.

If I use tests: "/build/test/index.html, the publicPath for Webpack is / (/build is stripped out).

This means that instead of 👍

$ easy-sauce -c easysauce.json

I have to change directories:

$ cd build && easy-sauce -c ../easysauce.json

It seems a simple solution, but when spinning up machines & waiting for tests to pass/fail to see that the problem is primarily with path issues was a bit painful.

I'm more than happy to submit a PR if you'd like.

Thanks!

ericclemmons avatar Jul 27 '16 02:07 ericclemmons

I'm happy to accept pull requests. Though I'm not entirely sure I'm understanding the problem. In your case are you using a webpack development server that's already running?

philipwalton avatar Jul 30 '16 02:07 philipwalton

This is the line that I'd like to turn into a variable:

https://github.com/philipwalton/easy-sauce/blob/master/lib/easy-sauce.js#L69

All of the files go into a build folder (including an index.html), so it should be served as if it's /, not /build.

ericclemmons avatar Jul 30 '16 18:07 ericclemmons

I see. Sure, I'd accept a pull request for this change. Or I can make it myself when I have some time.

philipwalton avatar Jul 30 '16 19:07 philipwalton