Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrmcc3/boot-rev
Boot task for file revisions. Renaming files to include version, hash etc. (fingerprinting)
https://github.com/mrmcc3/boot-rev
Last synced: 25 days ago
JSON representation
Boot task for file revisions. Renaming files to include version, hash etc. (fingerprinting)
- Host: GitHub
- URL: https://github.com/mrmcc3/boot-rev
- Owner: mrmcc3
- Created: 2015-08-09T04:06:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-21T00:05:25.000Z (over 8 years ago)
- Last Synced: 2024-12-13T21:11:42.078Z (28 days ago)
- Language: Clojure
- Size: 4.88 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# boot-rev
Boot task for file revisions (Naming files by version, hash etc.)
[![Clojars Project](https://img.shields.io/clojars/v/mrmcc3/boot-rev.svg)](https://clojars.org/mrmcc3/boot-rev)
### Usage
Use in `build.boot`:
```clj
(set-env! :dependencies '[[mrmcc3/boot-rev "0.1.0"]])
(require '[mrmcc3.boot-rev :refer [rev]]);; fingerprint all js files
(deftask demo-rev []
(comp
(rev :files [#"^.*\.js$"])
(target)))
```try a demo in this repo:
```bash
boot demo-rev
```By [adding metadata to `fileset`][meta] you can lookup paths in a following task:
[meta]: https://github.com/boot-clj/boot/wiki/Task-Writer%27s-Guide#metadata
```clj
;; you can get the reved path from the original path
(rev-path fileset "out/main.js") ;; -> out/main.ae34fc11.js
```### LICENSE
Copyright © 2015 Michael McClintock
Distributed under the Eclipse Public License, the same as Clojure.