Comments (14)
Can we do just 2? You're talking about generating a module alias file right?
from bs-webapi-incubator.
yes, just generating a module alias, but reason-js is not a vaild suffix or prefix
from bs-webapi-incubator.
Ah I remember: npm doesn't allow uppercase letters anymore, so the only choice the user has is snake_case. This probably sucks for camelCase. So let's not reuse package name...?
from bs-webapi-incubator.
Couldn't the package name just be transformed to snake_case? I'd like that for module names derived from (dasherized) filenames too. It's a simple and predictable process, and while there is a minute chance of accidental collisions it seems essentially theoretical to me.
from bs-webapi-incubator.
@glennsl what if we want the module to be called ReasonJs
rather than Reason_js
?
from bs-webapi-incubator.
Then I suppose you'd have to specify it, but you would have to do that either way, right? Having a generated default wouldn't change that.
from bs-webapi-incubator.
ReasonJs
looks better, it is acceptable to have all files renamed form 'xxRe' to 'ReasonJs_xx', too ugly ?
from bs-webapi-incubator.
btw, if we enforce such convention, then the build system could infer the package name, is a good idea?
from bs-webapi-incubator.
I dunno if this is coming from the right direction. I guess it's cool to look at the current convention and say "how can we adapt our build tools to make this better", but the real problem is that there's no notion of namespacing beyond that of a file. Doing funky things with the file name is, like, a cool hack, but hey we've got folders!! which provide a super great way of organizing files...
Could we instead adopt rust semantics for namespacing, where each folder essentially becomes a module?
from bs-webapi-incubator.
@jaredly I'd really like that, but I'm guessing the heavy reuse of ocaml's toolchain makes that difficult. I've heard rumours that ocaml might gain support for some form of namespacing sometime in the next decade or so, though!
@bobzhang I'd be fine with that. I'd be fine with anything, really, as long as it's not gibberish.
from bs-webapi-incubator.
cool, I will whip up a quick solution, stay tuned, btw, do you use open
too much?
from bs-webapi-incubator.
We have package names that also have .
in it. For starter, just a {"namespace": ...}
would be good enough. Can we leave the prefix/suffix thing to later? fooRe
is a lazy arbitrary convention I came up with to avoid collision internally.
I don't dislike @jaredly proposal either. But we can at least do a library-wise namespace first. If it's not too much trouble we can do both?
from bs-webapi-incubator.
@bobzhang I don't understand the question, Do you think I use open
too much? ReasonJs
and ReasonJs.Dom
is kind of designed to be open
ed, like a core library, though it could certainly use some cleaning up here and there.
from bs-webapi-incubator.
Closing for having outlived its usefulness, I think. There's namespace support in BS now. See #81
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.