Giter VIP home page Giter VIP logo

metalsmith-project-images's People

Contributors

depuits avatar nianwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

metalsmith-project-images's Issues

Async version of fs.exists is used bu 'done' is already scheduled to be called

This causes the metalsmith pipeline to continue even when this step has not finished. This causes weird errors when the files parameter to the plugin is modified by other steps in the pipeline (e.g. md -> html):

...\node_modules\metalsmith-project-images\src\index.js:67
files[file][options.imagesKey] = files[file][options.imagesKey] || [];
^
TypeError: Cannot read property 'images' of undefined

Use fs.existsSync on line 55 instead.

SyntaxError: Unexpected token =>

Hi! Thank you for a wonderful plugin. Excellent work on the local machine. But there are some problems with travis-ci (https://travis-ci.org/iamvlado/metalsmith-tests).

/home/travis/build/iamvlado/metalsmith-tests/node_modules/metalsmith-project-images/src/index.js:36
         _.each (options, (optionsItem) => {
                                       ^^
SyntaxError: Unexpected token =>

You do not know why this happens?

Post all images in a directory and its subdirectories

If I have a fold structure like so:
| images/
| |-- image-1.png
| |-- image-2.png
| |-- more-images/
| |-- |-- image-3.png
| |-- |-- image-4.png

...is there a way I can post all images at once with the same call?

Make imagesDirectory optional

Currently the folder specified as imagesDirectory has to exist in every project / item of your pattern.

e.g.:

.use(images({
    pattern: 'projects/**/*'
  }))

in every project there has to be a folder images. Otherwise you get an Error: ENOENT: no such file or directory

It would be great to be able to not have this folder, in case there are no images to the project.

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.