File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 319319 (-foreign? [this] false )
320320 (-closure-lib? [this] false )
321321 (-url [this] nil )
322+ (-relative-path [this] nil )
322323 (-provides [this] (:provides (deps/parse-js-ns (string/split-lines this))))
323324 (-requires [this] (:requires (deps/parse-js-ns (string/split-lines this))))
324325 (-source [this] this)
328329 (-closure-lib? [this] (:closure-lib this))
329330 (-url [this] (or (:url this)
330331 (deps/to-url (:file this))))
332+ (-relative-path [this] (let [file (io/as-file (:file this))]
333+ (if (and file (not (.isAbsolute file)))
334+ (:file this))))
331335 (-provides [this] (map name (:provides this)))
332336 (-requires [this] (map name (:requires this)))
333337 (-source [this] (if-let [s (:source this)]
339343 (-foreign? [this] foreign)
340344 (-closure-lib? [this] (:closure-lib this))
341345 (-url [this] url)
346+ (-relative-path [this] nil )
342347 (-provides [this] provides)
343348 (-requires [this] requires)
344349 (-source [this]
15001505 url
15011506 (cond
15021507 (deps/-closure-lib? js) (lib-rel-path js)
1503- (deps/-foreign? js) (util/relative-name url)
1508+ (deps/-foreign? js) (or (deps/-relative-path js)
1509+ (util/relative-name url))
15041510 :else (path-from-jarfile url))
15051511
15061512 (string? js)
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ case."
123123 library" )
124124 (-url [this] " The URL where this JavaScript is located. Returns nil
125125 when JavaScript exists in memory only." )
126+ (-relative-path [this] " Relative path for this JavaScript." )
126127 (-provides [this] " A list of namespaces that this JavaScript provides." )
127128 (-requires [this] " A list of namespaces that this JavaScript requires." )
128129 (-source [this] " The JavaScript source string." ))
You can’t perform that action at this time.
0 commit comments