Git Product home page Git Product logo

metalsmith-convert's People

Contributors

doodzik avatar gpaumier avatar kenhoff avatar santiagogil avatar tomterl avatar tornqvist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

metalsmith-convert's Issues

Failed at the [email protected] install script 'node-gyp rebuild'.

Hey I'm getting the following error when I try installing this package:

fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/imagemagick/src/imagemagick.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/Users/edward/.nvm/versions/node/v5.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:88:13)
gyp ERR! stack at ChildProcess.emit (events.js:173:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12)
gyp ERR! System Darwin 16.1.0
gyp ERR! command "/Users/edward/.nvm/versions/node/v5.2.0/bin/node"
"/Users/edward/.nvm/versions/node/v5.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/edward/Sites/art/node_modules/imagemagick-native
gyp ERR! node -v v5.2.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
[email protected] /Users/edward/Sites/art └── [email protected]
npm WARN [email protected] No repository field.
npm ERR! Darwin 16.1.0
npm ERR! argv "/Users/edward/.nvm/versions/node/v5.2.0/bin/node"
"/Users/edward/.nvm/versions/node/v5.2.0/bin/npm" "install" "--save" "metalsmith-convert"
npm ERR! node v5.2.0
npm ERR! npm v3.8.7
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.

p.s. I have installed imagemagick 7.0.4-6 via brew...

any help would be appreciated, thank you!

Imagemagick Native version fails under modern nodejs

Installing this package from npm no longer works if you're using a more recent version of nodejs (v4.x or v5.x) this is due to a current failure in NaN. There is a patch involved but it means working with a specific branch of imagemacgick-native and using that as the dependency.

See this comment here for more information. elad/node-imagemagick-native#102 (comment)

Doing a clone of metalsmith-convert, changing the install location to this branch elad/node-imagemagick-native.git#travis-4.1 and then installing locally into my project allows me to use metalsmith-convert absolutely as normal.

Happy to submit a PR if you want however wasn't certain of how to run the tests etc to package it all up properly to validate nothing else has broken as a result of the upgrade.

feature request: stup option

I would love to have something like a stup option.
So that the files are just renamed without transforming them.
This would increase the building process in development.

add support to keep original format

Would be great to be able to leave out the target format and keep the original format when using a multi extension glob pattern.

example files:
image.png
secondimage.jpg

currently it's necessary to specify a target format:

{
    "src": "**/*.{png,gif,jpg}",
    "target": "jpg",
    "resize": {width: 3200, height: 2000, resizeStyle: 'aspectfit'},
    "nameFormat": "%b_max%e"
}

output >
image.jpg
secondimage.jpg

without target format:

{
    "src": "**/*.{png,gif,jpg}",
    "resize": {width: 3200, height: 2000, resizeStyle: 'aspectfit'},
    "nameFormat": "%b_max%e"
}

output >
image.png
secondimage.jpg

performance

Please, Have you any benchmart for converting 100 images ?

.use(convert({
src: '*/.jpg',
target: 'png'
}))

seems unusable to me and seems to block whole build process for minutes

outputting multiple sizes in pipeline doesn't work

Doing the following only serves me the first file size, but not the second:

.use(convert(
    {
    "src": "**/*.jpg",
    "target": "jpg",
    "resize": {width: 3200, height: 2000, resizeStyle: 'aspectfit'},
    "nameFormat": "%b_max%e"
  },
  {
    "src": "**/*.jpg",
    "target": "jpg",
    "resize": {width: 320, height: 240, resizeStyle: 'aspectfit'},
    "nameFormat": "%b_thumb%e"
  }))

Is there a way to configure it to create 2 different file sizes?

Thanks!

keeping original file name with remove option removes converted file

Keeping the original filename and removing the original source file don't play well together.

"nameFormat": "%b%e",
"remove": true

This removes the converted file, which is confusing and not what the documentation describes. Only the source file should be removed.
Of course there can't be two files with the same name. So maybe in that case the source file should get a suffix like _source or _org?

Add option to select filename of output

Could you maybe add an option to select the filename of the output?
I'd like to use something like filename_thumb.ext instead of filename_xxx_yyy.ext.
This way it's easier to finetune some image sizes later on without having to change it everywhere it was used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.