Skip to content

Commit

Permalink
various minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 15, 2014
1 parent 71f275e commit 16960ae
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[package.json]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function generate(args, opts) {
var s = pageres.stats.screenshots;
var u = pageres.stats.urls;

console.log(chalk.green('\nSuccessfully generated %d screenshots from %d %s and %d %s'), i, u, (u === 1 ? 'url' : 'urls'), s, (s === 1 ? 'resolution': 'resolutions'));
console.log(chalk.green('\n✔') + ' Successfully generated %d screenshots from %d %s and %d %s', i, u, (u === 1 ? 'url' : 'urls'), s, (s === 1 ? 'resolution': 'resolutions'));
});
}

Expand Down
1 change: 0 additions & 1 deletion fixture/fixture.html

This file was deleted.

21 changes: 21 additions & 0 deletions license
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
File renamed without changes.
10 changes: 6 additions & 4 deletions test.js → test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ var assert = require('assert');
var fs = require('fs');
var imageSize = require('image-size');
var concat = require('concat-stream');
var Pageres = require('./index');
var Pageres = require('../');

process.chdir(__dirname);

before(function () {
this.timeout(20000);
Expand Down Expand Up @@ -58,7 +60,7 @@ it('should have a `delay` option', function (cb) {
it('should crop image using the `crop` option', function (cb) {
var pageres = new Pageres({ crop: true })
.src('http://todomvc.com', ['1024x768']);

pageres.run(function (err, streams) {
assert(!err, err);

Expand All @@ -73,12 +75,12 @@ it('should crop image using the `crop` option', function (cb) {

it('should support local relative files', function (cb) {
var pageres = new Pageres()
.src('fixture/fixture.html', ['1024x768']);
.src('fixture.html', ['1024x768']);

pageres.run(function (err, streams) {
assert(!err, err);

assert.strictEqual(streams[0].filename, 'fixture!fixture.html-1024x768.png');
assert.strictEqual(streams[0].filename, 'fixture.html-1024x768.png');

streams[0].once('data', function (data) {
assert(data.length > 1000);
Expand Down

0 comments on commit 16960ae

Please sign in to comment.