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