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

Using the suffix option breaks having multiple widths #12

Open
notasausage opened this issue Jul 15, 2016 · 0 comments
Open

Using the suffix option breaks having multiple widths #12

notasausage opened this issue Jul 15, 2016 · 0 comments

Comments

@notasausage
Copy link

I just started using this in my gulp process of creating HTML emails in order to send them to InVIsion for review by placing screenshots in a local folder that is pushed to the web app using the InVision Sync menubar app. In order for InVision to see these screenshots as hiDPI images, I need to add the @2x suffix on the filename.

The problem is that adding the suffix option to the gulp task overrides the width option's ability to create multiple screenshots of the same HTML in different widths.

if ( opts.suffix ) {
    dest = filename.replace('.html', '') + '-' + opts.suffix + '.' + opts.type;
} else if ( opts.zoom > 1 ) {
    dest = filename.replace('.html', '') + '-' + w + '-zoom-' + opts.zoom + '.' + opts.type;
} else {
    dest = filename.replace('.html', '') + '-' + w + '.' + opts.type;
}

I'd suggest changing the suffix created when zoom is specified to use the more standardized @2x or @3x, etc. and mention in the documentation that the suffix option cannot be used at the same time as multiple width declarations.

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

1 participant