Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about file locations.... #3

Closed
Dylan-Chapman opened this issue Dec 1, 2014 · 3 comments
Closed

Question about file locations.... #3

Dylan-Chapman opened this issue Dec 1, 2014 · 3 comments

Comments

@Dylan-Chapman
Copy link

How do you save screenshots to a different folder? I can't change them in phantomcss.init() ("has no method 'init'"), and it doesn't work passing the options directly into phantomcss(). I'm new to gulp in general, and more so this, so any direction would be appreciated.

The options I was testing are screenshotRoot and failedComparisonsRoot.

Are these options available and I'm overlooking how to do it?

@awayken
Copy link

awayken commented Mar 18, 2015

@Dylan-Chapman: I don't know much about this Gulp plugin, but in reading the code there appear to be the following options you can pass in:

  • screenshots: path for screenshots
  • results: path for results?
  • viewportSize: array of [ width, height ] establishing viewport
  • logLevel: what level of message should be logged

That's what I see, but all I can do is to guess at what the different options mean and do.

Here's a snippet of how you might change the screenshot and results paths:

gulp.task('phantomcss', function() {
    var phantomcss = require('gulp-phantomcss');

    return gulp.src('./test/styles/phantomcss.js')
        .pipe( phantomcss({
            screenshots: './test/styles/screenshots',
            results: './test/styles/results'
        }) );
});

@awayken
Copy link

awayken commented Mar 18, 2015

logLevel seems to correspond to CasperJS logging levels: http://docs.casperjs.org/en/latest/logging.html

Edit: I just saw that the readme.md mentions this already.

@danbroooks
Copy link
Owner

Updated the README to hopefully make things a bit clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants