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

Zoom option creates filenames with @2x, @3x, etc. #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ var browser = function (file, opts, cb) {
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;
dest = filename.replace('.html', '') + '-' + w + '@' + opts.zoom + 'x.' + opts.type;
} else {
dest = filename.replace('.html', '') + '-' + w + '.' + opts.type;
}

// Background problem under self-host server
page.evaluate(function () {
var style = document.createElement('style');
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Zoom level to set the phantom.js browser viewport. Can be used to take 2x, 3x, e
Type: `String`
Default: 'false'

A custom suffix for output file name, you can use -thumb, -shot, etc. And the output file will named source-file-name + custom-suffix. If no suffix set, will use default suffix.
A custom suffix for output file name, you can use -thumb, -shot, etc. And the output file will named source-file-name + custom-suffix. If no suffix set, will use default suffix. If `suffix` is set, only the first `width` option will be created.

## Demo

Expand Down