Open rxaviers opened 9 years ago
@rxaviers I understand your concern here. However this structure outside of the root is common to all our ibm-js projects in order to avoid projects duplication and works with the overall build system. As far as I know even if not ideal the default paths are working (I mean if you do bower install everything should went fine). And obviously if one wants to install the dependencies differently he can always do using AMD mapping himself? So we should be ok with what we have?
So we should be ok with what we have?
- Except for the cldr paths that are currently relative and need to be changed to allow AMD path mapping (e.g., from
../cldr/sup...
tocldr/sup...
). I can reduce this PR to that.- Unless your ibm-js projects use different versions of the same dependency.
For 1) my testing shows that there is no need for a module id to be absolute in order to use paths configuration in requirejs. You can use the following configuration:
requirejs.config({
paths: {
"ecma402/cldr": "any/path/to/cldr"
}
}):
So I am not sure this PR still make sense. Obviously, when we have a solution using cldr-data, we will have to update the path to cldr data so no additional configuration is required but in the meantime I don't see a reason to change that.
I'm ok with whatever preference you like here. Although, this is not what I commonly see elsewhere.
In my opinion, libraries should make decisions targeting developers convenience. For example, the simplification of their configuration files.
requirejs.config({
paths: {
"cldr": "any/path/to/cldr"
}
}):
I don't think we want advocate the below.
requirejs.config({
paths: {
"ecma402/cldr": "any/path/to/cldr",
"globalize/cldr": "any/path/to/cldr",
"foo/cldr": "any/path/to/cldr",
...
}
}):
@rxaviers I think we agree with you we just say let's wait for the common CLDR problem (cld-data) being solved first?
Ok, so we're going to land this together with #66 (and not before as I've initially proposed).
sounds good.
See PR #74
Test requires installing sibling projects (i.e., it leaks files outside of its root) with specific names or it fails (e.g., if you name your local ecma402 directory
my-ecma402
, tests will fail).The suggestion is to use AMD paths mappings, which is more a flexible approach (and less error prone).