https://github.com/tailrecursion/boot-front
task for invalidating amazon web services (aws) cloudfront paths.
https://github.com/tailrecursion/boot-front
Last synced: 9 months ago
JSON representation
task for invalidating amazon web services (aws) cloudfront paths.
- Host: GitHub
- URL: https://github.com/tailrecursion/boot-front
- Owner: tailrecursion
- Created: 2017-02-24T13:36:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-09-02T19:02:56.000Z (almost 8 years ago)
- Last Synced: 2025-10-13T01:52:27.278Z (9 months ago)
- Language: Clojure
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 15
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# boot-front
a boot task for invalidating cloudfront paths.
[](dependency)
```clojure
[tailrecursion/boot-front "1.1.0"] ;; latest release
```
[](/dependency)
## overview
this task inspects the fileset's metadata to identify files that were uploaded
by preceeding tasks as indicated by a keyword with the name "uploaded", then
invalidates their corresponding paths (see [boot-bucket](https://github.com/tailrecursion/boot-bucket)).
## usage
excerpt of a build.boot file using boot-front with boot-bucket for deployment.
```clojure
(require
'[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-reload :refer [reload]]
'[hoplon.boot-hoplon :refer [hoplon]]
'[tailrecursion.boot-bucket :refer [spew]]
'[tailrecursion.boot-front :refer [burst]]
'[tailrecursion.boot-static :refer [serve]])
(def buckets
{:production "-production-application"
:staging "-staging-application"})
(def distributions
{:production ""
:staging ""})
(deftask develop
"Continuously rebuild the application during development."
[o optimizations OPM kw "Optimizations to pass the cljs compiler."]
(let [o (or optimizations :none)]
(comp (watch) (speak) (hoplon) (target) (reload) (cljs :optimizations o) (serve))))
(deftask build
"Build the application with advanced optimizations."
[o optimizations OPM kw "Optimizations to pass the cljs compiler."]
(let [o (or optimizations :advanced)]
(comp (speak) (hoplon) (cljs :optimizations o :compiler-options {:elide-asserts true}) (sift))))
(deftask deploy
"Build the application with advanced optimizations then deploy it to s3."
[e environment ENV kw "The application environment to be utilized by the service."
o optimizations OPM kw "Optimizations to pass the cljs compiler."]
(assert environment "Missing required environment argument.")
(let [b (buckets environment)
d (distributions environment)]
(comp (build :optimizations optimizations) (spew :bucket b) (burst :distribution d))))
(task-options!
serve {:port 3001}
sift {:include #{#"index.html.out/" #"/"} :invert true}
spew {:access-key (System/getenv "")
:secret-key (System/getenv "")}
burst {:access-key (System/getenv "")
:secret-key (System/getenv "")})
```