Giter Club home page Giter Club logo

Comments (10)

glennsl avatar glennsl commented on May 23, 2024 1

It's been merged :)

from bs-webapi-incubator.

glennsl avatar glennsl commented on May 23, 2024

Renaming Bs_webapi to Webapi was actually done in preparation of namespaces. I've just not gotten around to flipping the switch yet. Feel free to submit a PR if you've done so in a fork. I'll then just have to publish it to the @reasonml-community org.

from bs-webapi-incubator.

arnarthor avatar arnarthor commented on May 23, 2024

Yeah, I have it ready in a fork. I'll submit a PR when the additional bindings I added have been merged, that way I can change that part a tiny bit so I don't need to have the indirection of FileRe.re for example.

from bs-webapi-incubator.

yawaramin avatar yawaramin commented on May 23, 2024

Any further thoughts on this? Is namespacing still a go?

from bs-webapi-incubator.

yawaramin avatar yawaramin commented on May 23, 2024

Oh, I see @arnarthor did a PR but there were some complications, #82

If you all don't mind I would like to try a different approach to this, which I discussed in my post recently: https://dev.to/yawaramin/a-modular-ocaml-project-structure-1ikd

It would preserve all the user-visible module hierarchies and the file structure would look like this:

src
├── Webapi
│   ├── Webapi_Base64.re
│   ├── Webapi_Canvas
│   │   ├── Webapi_Canvas_Canvas2d.re
│   │   └── Webapi_Canvas_WebGl.re
│   ├── Webapi_Canvas.re
│   ├── Webapi_Dom
│   │   ├── Webapi_Dom_AnimationEvent.re
│   │   ├── Webapi_Dom_Attr.re
...
│   │   ├── Webapi_Dom_WheelEvent.re
│   │   └── Webapi_Dom_Window.re
│   ├── Webapi_Dom.re
│   ├── Webapi_File.re
│   └── Webapi_Url.re
└── Webapi.re

There would be no incompatible changes for anyone using the aliased modules, like Webapi.Dom.Element, and no conflicts with modules like BuckleScript's Dom or e.g. ImageRe.

from bs-webapi-incubator.

glennsl avatar glennsl commented on May 23, 2024

Yeah, this is my preferred method of namespacing as well (The Re suffix was a facebook convention that I think they've dropped internally now as well), although I think you should use double underscores to be consistent with how it's usually done in OCaml, since single underscore is typically used as word separator there.

The Dom module is a pain in the ass in other ways too, and I think the best resolution is to transition it to Js.Dom, but that's going to take some time in any case.

from bs-webapi-incubator.

yawaramin avatar yawaramin commented on May 23, 2024

Cool, sending a PR in a few.

from bs-webapi-incubator.

TomiS avatar TomiS commented on May 23, 2024

@yawaramin Hey. I realize I'm a bit late to the party and also abusing issues a bit, but I'd like to know why you ended up with double underscores instead of just one in this library? Are there any good reasons for that other than maybe some aesthetic preference?

from bs-webapi-incubator.

yawaramin avatar yawaramin commented on May 23, 2024

@TomiS see #81 (comment) :-)

from bs-webapi-incubator.

TomiS avatar TomiS commented on May 23, 2024

@yawaramin Ah, I understand you're following the convention from your article here. However, your article suggest one underscore but this library uses two. I was just wondering if there is a specific reason for that, that I should also consider.

from bs-webapi-incubator.

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.