now bs namespace is force bind with npm package name, it鈥榮 a trouble.
example, I want to create a bs lib project "bs-demo", it has much more module, one of them called "Utils". I hope I can use it in other project like this:
let value = Demo.Utils.value;
I have not idea to do that 馃槀
if I set namespace: true, the namespace will be "BsDemo", nobody like it. If I not use namespace, I must write all code in a single file "demo.re", it is not friendly to big project.
for sub module I will write it in a other file and reference it in parent module, like this:
make submodule file "Utils_Pi.re", and write it in "Utils.re":
module Pi = Utils_Pi;
in fact, most npm package is not bs project, bind npm package name to namespace is not necessary.
Note originally I made this choice to simplify things, e.g, always have unique names guaranteed by npm package names. Since technology may not just be technology, it may make sense to allow it configurable, what do other people think?
@bobzhang I sent a mail for you at 8/18 with chinese. I hope I can provide some libs for reason, but the module system & namespace function is confusing.
@andares thanks, I missed your email, will check later, sorry for the delay
You should be able to configure the name of the namespace. Otherwise, you'll end up with ugly module names, especially when using scoped packages (@company/bs-package).
This is landed in master, early feedback is appreciated
Most helpful comment
You should be able to configure the name of the namespace. Otherwise, you'll end up with ugly module names, especially when using scoped packages (
@company/bs-package).