Comments (10)
It's been merged :)
from bs-webapi-incubator.
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.
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.
Any further thoughts on this? Is namespacing still a go?
from bs-webapi-incubator.
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.
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.
Cool, sending a PR in a few.
from bs-webapi-incubator.
@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.
@TomiS see #81 (comment) :-)
from bs-webapi-incubator.
@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)
- Function for converting Node to real type HOT 1
- Project name HOT 2
- Nodelist forEach HOT 2
- Dom.Image does not exist (the current Dom.Image should be Dom.ImageData)?
- adding bindings to HtmlVideoElement HOT 3
- Binding for XHR HOT 1
- Classify for Dom.node HOT 4
- Adding replaceChild
- Canvas2d.putImageData creates erroneous calls when not using all the optionals. HOT 3
- Could be possible to perform auto-generation from WebIDL? HOT 3
- Bsdoc dependency makes contributing a bit difficult on Linux HOT 2
- Binding for URLSearchParams.entries() is incorrect
- Add bindings for HtmlTemplateElement
- unmet peer dependency warning HOT 1
- Regarding document.documentElement.scrollTop HOT 2
- Add functor to type CustomEvent.detail
- How to use HtmlInputElement (focus, select) ? HOT 5
- How to use addEventListener on window HOT 3
- Add DataTransfer bindings
- unsafeAsHtmlInputElement
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bs-webapi-incubator.