Code Monkey home page Code Monkey logo

Comments (12)

ahmadnassri avatar ahmadnassri commented on August 29, 2024

should be fairly simple and straightforward with browserify ... if I remove all the require-directory dependencies ... (which I'm planning to do, but PRs are also welcome)

it gets complicated with the tests because of require-directory, but otherwise, no special dependencies ...

are you asking for stoplight.io?

from httpsnippet.

marbemac avatar marbemac commented on August 29, 2024

Yes indeed! Doing some investigating, and was curious. Is this something you were/are planning to do? We might have time to tackle this in the next couple of months. I just haven't had a chance to look through the code and was curious what you thought the scope of work involved might look like.

from httpsnippet.

ahmadnassri avatar ahmadnassri commented on August 29, 2024

yep, I have a branch locally, to remove require-directory but wasn't a priority so far ...

whoever, gets to it first maybe? :)

would love to chat more about stoplight.io, very interested in playing, also perhaps some room for collaboration with Mashape ... can take this convo offline / email.

from httpsnippet.

marbemac avatar marbemac commented on August 29, 2024

Not a huge priority for us either just yet - right now we're firmly in the desktop environment, with access to node. That said, I could see this easily becoming the defacto http code gen library with browser support. Would be awesome :).

Absolutely, would love to chat! Shoot me a note marc [at] stoplight.io when you have a moment.

from httpsnippet.

ahmadnassri avatar ahmadnassri commented on August 29, 2024

okay, so I looked at my code and it wasn't that much more left, so I wrapped it up and released under v1.16.4 (removing dependency on require-directory)

this should make it work with Browserify now, but I haven't tested it ... 99% certain everything will work though ... (famous last words) 😉

will send you email to chat further

from httpsnippet.

marbemac avatar marbemac commented on August 29, 2024

👍 awesome! Will play around with a browser version in the next month or so. Thanks a bunch.

Looking forward to chatting.

from httpsnippet.

mxr576 avatar mxr576 commented on August 29, 2024

@marbemac Did you managed to run httpsnippet in browser?

I'm getting this error continuously with browserify:

Error: Cannot find module '../../is-buffer/index.js' from '/private/tmp'
    at /private/tmp/node_modules/resolve/lib/async.js:55:21
    at load (/private/tmp/node_modules/resolve/lib/async.js:69:43)
    at onex (/private/tmp/node_modules/resolve/lib/async.js:92:31)
    at /private/tmp/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:117:15)

from httpsnippet.

mxr576 avatar mxr576 commented on August 29, 2024

Okay, it seems webpack can do this without any problem.

from httpsnippet.

ahmadnassri avatar ahmadnassri commented on August 29, 2024

@mxr576 if you do a production install, it would not need the filesystem dependency ...

https://github.com/Mashape/httpsnippet/blob/master/package.json#L74

from httpsnippet.

mxr576 avatar mxr576 commented on August 29, 2024

I've found other issue with this library. FormData refers to HTML5's FormData and it cannot be overridden properly in browsers (or at least I wasn't able to do that). But as I can see this module isn't a hard dependency of this module so it could be removed, what do you think?
mxr576@a968e69
mxr576@f6b6d92

Should I create a Pull request from these commits?

Browserify is still not working properly on this library for me, but webpack works fine.

from httpsnippet.

ahmadnassri avatar ahmadnassri commented on August 29, 2024

@mxr576 I left a comment there, using FormData will ONLY work in the browser, not sure that's a good approach.

from httpsnippet.

mxr576 avatar mxr576 commented on August 29, 2024

You're right of course, here is a new, more "cross-platform-ish" solution to this problem: mxr576@4542425

from httpsnippet.

Related Issues (20)

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.