When using phantomcss.init to set the screenshotRoot and other variables, the script fails because Resemble.js is not found. It seems this is being circumvented in the demo code by setting libraryRoot to a hard-coded value.
It seems counter-intuitive that using completely unrelated keys in the init function should so badly affect libraryRoot. Additionally, the way the Renderer.js path is being found is odd. It makes sense to simply do something like:
Currently this might be a bug as options.resemblePath is actually _resemblePath which is undefined.
I got a bit lost with all the file naming conventions as well. All I want to do is prevent a folder with the name undefined from appearing in test/integrations, but it's a bit unclear what value needs to be set to do that. And playing around with absolute paths goes against the npm ethos of being able to npm run from anywhere.
I see why the require.resolve thing won't work now. Eugh casperjs require patch is not nice! Still it would be nice if an unrelated call to init didn't bodge everything up, although it looks quite fiddly to fix.
When using
phantomcss.init
to set thescreenshotRoot
and other variables, the script fails becauseResemble.js
is not found. It seems this is being circumvented in the demo code by settinglibraryRoot
to a hard-coded value.It seems counter-intuitive that using completely unrelated keys in the
init
function should so badly affectlibraryRoot
. Additionally, the way theRenderer.js
path is being found is odd. It makes sense to simply do something like:Currently this might be a bug as
options.resemblePath
is actually_resemblePath
which isundefined
.I got a bit lost with all the file naming conventions as well. All I want to do is prevent a folder with the name
undefined
from appearing intest/integrations
, but it's a bit unclear what value needs to be set to do that. And playing around with absolute paths goes against thenpm
ethos of being able tonpm run
from anywhere.