ibm-js / ecma402

ECMA-402 JavaScript Internationalization API "shim"
Other
34 stars 21 forks source link

Leverage requirejs-plugins/has to conditionally load the Intl shim. fix #20. #46

Closed clmath closed 10 years ago

clmath commented 10 years ago

This will allow to force the use of the shim using requirejs config like this:

require.config({
    config: {
        "requirejs-dplugins/has": {
            "Intl-api": false
        }
    }
}

This fix issue #20.

wkeese commented 10 years ago

Can't you already force use of the shim via?

requirejs.config({
    map: {
        '*': {
            'ecma402/Intl': 'ecma402/IntlShim'
        }
    }
});

PS: It's still good for Intl.js to use has.add().

clmath commented 10 years ago

Yes you can (although, if I understand the documentation here correctly, it would be the other way around).

A better reason to use the has plugin is to leverage its build part.

wkeese commented 10 years ago

OK. Then, it seems fine to me.

cjolif commented 10 years ago

Looks good to me as well. @JCEmmons any objection to @clmath going ahead and merging this?

JCEmmons commented 10 years ago

I'm fine with it. Go ahead and merge...

clmath commented 10 years ago

Fixed with https://github.com/ibm-js/ecma402/commit/9267dc0b08ff23a5fe7961b2600a9729e9ea7bcd.