GithubHelp home page GithubHelp logo

elingerojo / contexter-cli Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 1.19 MB

A demo application that extends the `npm contexter` metadata extraction capability to images also

JavaScript 97.85% HTML 1.89% CSS 0.26%

contexter-cli's People

Contributors

billiegoose avatar elingerojo avatar

Watchers

 avatar  avatar

contexter-cli's Issues

enhancement: live update instead of refresh page

Right now the page refreshes and all my opened tree nodes get closed again. The next logical step is to make it a React application that gets a live update from a Websocket server and updates the content without a page refresh!

Ooh, or better yet, we could use the legit "hot module replacement" protocol that webpack and browserify-hmr use! Just have our "context state" exported as a module... I've never learned how hot module replacement works, that would be so much fun.

Assign to me! :)

catch errors thrown by image-size

Apparently this can happen:

E:\global_modules\node_modules\contexter-cli\node_modules\image-size\lib\types\svg.js:72
  throw new TypeError('invalid svg');
  ^

TypeError: invalid svg
    at Object.calculate (E:\global_modules\node_modules\contexter-cli\node_modules\image-size\lib\types\svg.js:72:9)
    at lookup (E:\global_modules\node_modules\contexter-cli\node_modules\image-size\lib\index.js:26:31)
    at module.exports (E:\global_modules\node_modules\contexter-cli\node_modules\image-size\lib\index.js:100:12)
    at File.setDimensions (E:\global_modules\node_modules\contexter-cli\lib\files\image.js:23:23)
    at Object.parse (E:\global_modules\node_modules\contexter-cli\lib\plugins\app-image.js:29:10)
    at File.getContent (E:\global_modules\node_modules\contexter-cli\node_modules\contexter\lib\file.js:167:24)
    at File.squeeze (E:\global_modules\node_modules\contexter-cli\node_modules\contexter\lib\file.js:146:10)
    at File.initialize (E:\global_modules\node_modules\contexter-cli\node_modules\contexter\lib\file.js:36:10)
    at Context.newFile (E:\global_modules\node_modules\contexter-cli\node_modules\contexter\lib\context.js:51:13)
    at createFile (E:\global_modules\node_modules\contexter-cli\node_modules\contexter\lib\index.js:85:15)

I think it was an SVG font it tripped on... it had just loaded /doc/fonts/glyphicons-halflings-regular.eot added so I don't know if that means it crashed on that file or the one immediately afterward.

Just throw a try/catch wrapper around that and you should be good!

Edit: yup, crash is definitely from the font glyphicons-halflings-regular.svg

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.