Skip to content

Instantly share code, notes, and snippets.

@mhuebert
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhuebert/3f6a9f4483ccdfccf318 to your computer and use it in GitHub Desktop.
Save mhuebert/3f6a9f4483ccdfccf318 to your computer and use it in GitHub Desktop.
CLJS javascript dependency load order?
; I want to use the files referenced in deps.cljs
; - CodeMirror must run before -overlay, -subpar, and -match-brackets.
(ns my-project.core
(:require
[CodeMirror]
[CodeMirror-overlay]
[CodeMirror-subpar]
[CodeMirror-match-brackets]
[reagent.core :as r :refer [cursor]]
; ...
))
; it does not matter what order I put CodeMirror, CodeMirror-overlay,
; CodeMirror-subpar, etc. - they always load in the same (wrong) order.
; this is in src/ of the CLJS library I want to use
{:foreign-libs
[{:file "codemirror/codemirror.js"
:provides ["CodeMirror"]}
{:file "codemirror/overlay.js"
:provides ["CodeMirror-overlay"]}
{:file "codemirror/subpar-with-keymap.js"
:provides ["CodeMirror-subpar"]}
{:file "codemirror/match-brackets.js"
:provides ["CodeMirror-match-brackets"]}
]
:externs ["codemirror/codemirror-externs.js"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment