ignore-patterns should work
This commit is contained in:
parent
137705e81c
commit
423790edb1
2 changed files with 8 additions and 4 deletions
|
@ -36,8 +36,10 @@
|
|||
|
||||
(defn filter-resources-for-ignore-patterns
|
||||
[ignore-patterns resources]
|
||||
(filter #(not (re-matches (re-pattern ignore-patterns) (:virtual-path %)))
|
||||
resources))
|
||||
(if ignore-patterns
|
||||
(filter #(not (re-matches (re-pattern ignore-patterns) (:virtual-path %)))
|
||||
resources)
|
||||
resources))
|
||||
|
||||
(defn resource-from-cp-or-fs ;:- Resource
|
||||
[fs-prefix ;:- Prefix
|
||||
|
|
|
@ -41,8 +41,9 @@
|
|||
(let [base-path "templates/md"
|
||||
resources (cp-io/get-resources
|
||||
fs-prefix base-path [pages posts])
|
||||
filtered-resources (->> (filter #(= (:resource-type %) :dir) resources)
|
||||
(cp-io/distinct-resources-by-path))]
|
||||
filtered-resources (cp-io/filter-resources-for-ignore-patterns ignore-patterns
|
||||
(->> (filter #(= (:resource-type %) :dir) resources)
|
||||
(cp-io/distinct-resources-by-path)))]
|
||||
filtered-resources))
|
||||
|
||||
(defn create-dirs-from-markup-folders!
|
||||
|
@ -75,6 +76,7 @@ if no, return empty vector."
|
|||
(->> assets
|
||||
filter-file
|
||||
filter-ext
|
||||
(cp-io/filter-resources-for-ignore-patterns ignored-files)
|
||||
(map get-java-file))))
|
||||
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue