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 319
319
(-foreign? [this] false )
320
320
(-closure-lib? [this] false )
321
321
(-url [this] nil )
322
+ (-relative-path [this] nil )
322
323
(-provides [this] (:provides (deps/parse-js-ns (string/split-lines this))))
323
324
(-requires [this] (:requires (deps/parse-js-ns (string/split-lines this))))
324
325
(-source [this] this)
328
329
(-closure-lib? [this] (:closure-lib this))
329
330
(-url [this] (or (:url this)
330
331
(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))))
331
335
(-provides [this] (map name (:provides this)))
332
336
(-requires [this] (map name (:requires this)))
333
337
(-source [this] (if-let [s (:source this)]
339
343
(-foreign? [this] foreign)
340
344
(-closure-lib? [this] (:closure-lib this))
341
345
(-url [this] url)
346
+ (-relative-path [this] nil )
342
347
(-provides [this] provides)
343
348
(-requires [this] requires)
344
349
(-source [this]
1500
1505
url
1501
1506
(cond
1502
1507
(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))
1504
1510
:else (path-from-jarfile url))
1505
1511
1506
1512
(string? js)
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ case."
123
123
library" )
124
124
(-url [this] " The URL where this JavaScript is located. Returns nil
125
125
when JavaScript exists in memory only." )
126
+ (-relative-path [this] " Relative path for this JavaScript." )
126
127
(-provides [this] " A list of namespaces that this JavaScript provides." )
127
128
(-requires [this] " A list of namespaces that this JavaScript requires." )
128
129
(-source [this] " The JavaScript source string." ))
You can’t perform that action at this time.
0 commit comments