ClojureScript

:global-exports for foreign libraries

Details

  • Type: Task Task
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Completed
  • Affects Version/s: 1.9.854
  • Fix Version/s: 1.9.854
  • Component/s: None
  • Approval:
    Accepted

Description

To make foreign libraries more idiomatic to use and in order to ease future migration to direct node_modules usage users need a way to define what global exports a foreign lib provides. Regular foreign libraries export global names and the requires are synthetic. We can fix this issue by allowing foreign libraries to describe what they globally export.

{:file ...
 :file-min ...
 :requires [...]
 :provides [...]
 :global-exports '{cljsjs.react React 
                   cljsjs.react/dom-server ReactDOMServer}} ;; map :provides to a :require'able name
  1. CLJS-2214.patch
    12/Jul/17 11:04 AM
    7 kB
    Juho Teperi
  2. CLJS-2214-2.patch
    12/Jul/17 12:36 PM
    9 kB
    Juho Teperi

Activity

Hide
David Nolen added a comment -

`global$module$` for the module name please. And lets lift out some helpers to make this cleaner.

Show
David Nolen added a comment - `global$module$` for the module name please. And lets lift out some helpers to make this cleaner.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: