readium / readium-shared-js

Repository for the shared JavaScript libraries that are used in the SDK-Launchers and other applications developed on top of the SDK
BSD 3-Clause "New" or "Revised" License
78 stars 101 forks source link

URI is expected to be global in views/internal_links_support.js #361

Open bradleygore opened 7 years ago

bradleygore commented 7 years ago

This issue is a Bug

Expected Behaviour

Expected that URI(..) object being used would be injected w/ RequireJS instead of expected to be global.

Observed behaviour

The URI object is used inside views/internal_links_support.js but is not in the injected params: Usage: https://github.com/readium/readium-shared-js/blob/aa0d5722818e21b7fd0c16f21f58f09976215a39/js/views/internal_links_support.js#L157 Module Params: https://github.com/readium/readium-shared-js/blob/aa0d5722818e21b7fd0c16f21f58f09976215a39/js/views/internal_links_support.js#L25

danielweck commented 7 years ago

Thanks! There is already a TODO in the "globals setup" code: https://github.com/readium/readium-shared-js/blob/develop/js/globalsSetup.js#L34

For future reference:

The RequireJS alias for dependency injection is "URIjs": https://github.com/readium/readium-shared-js/blob/develop/build-config/RequireJS_config_common.js#L38

The NodeJS module is "urijs": https://github.com/readium/readium-shared-js/blob/develop/package.cson#L123