Skip to content

Commit

Permalink
show exif info when module is installed (for debugging)
Browse files Browse the repository at this point in the history
  • Loading branch information
gasolin committed Nov 22, 2016
1 parent a6a6535 commit 4824502
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.2.3
-------------------

* show exif info when `exif-reader` module is installed (for debugging)

1.2.2 (2016/11/23)
-------------------

Expand Down
10 changes: 10 additions & 0 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ var path = require('path');
var sanitize = require('sanitize-filename');
var sharp = require('sharp');
var glob = require('glob');
var exif = null;
try {
exif = require('exif-reader');
} catch (err) {
console.log(chalk.green('production mode'));
}

module.exports = yeoman.Base.extend({
prompting: function () {
Expand Down Expand Up @@ -116,6 +122,10 @@ module.exports = yeoman.Base.extend({
var resize = 2048;
this.log(chalk.yellow(`processing image...`));
image.metadata().then(metadata => {
if (exif) {
var meta = exif(metadata.exif);
this.log(meta);
}
// only resize image when in embedded mode
if (this.props.embedded) {
embedded = ' embedded';
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"yeoman-assert": "^2.0.0",
"eslint": "^3.1.1",
"eslint-config-xo-space": "^0.15.0",
"exif-reader": "^1.0.1",
"gulp": "^3.9.0",
"gulp-eslint": "^3.0.1",
"gulp-exclude-gitignore": "^1.0.0",
Expand Down

0 comments on commit 4824502

Please sign in to comment.