|
| 1 | +(set-env! |
| 2 | + :resource-paths #{"resources"} |
| 3 | + :dependencies '[[cljsjs/boot-cljsjs "0.10.3" :scope "test"]]) |
| 4 | + |
| 5 | +(require '[cljsjs.boot-cljsjs.packaging :refer :all] |
| 6 | + '[boot.core :as boot] |
| 7 | + '[boot.tmpdir :as tmpdir] |
| 8 | + '[boot.util :refer [dosh]] |
| 9 | + '[clojure.java.io :as io]) |
| 10 | + |
| 11 | +(def +lib-version+ "19.0.0") |
| 12 | +(def +lib-checksum+ "D904467925A64A9E000A57F471C59CDF") |
| 13 | +(def +version+ (str +lib-version+ "-0")) |
| 14 | +(def +lib-folder+ (format "ag-grid-community-%s" +lib-version+)) |
| 15 | + |
| 16 | +(defn- dosh-cmd [& args] |
| 17 | + (apply dosh (if (re-find #"^Windows" (.get (System/getProperties) "os.name")) |
| 18 | + (into ["cmd.exe" "/c"] args) |
| 19 | + args))) |
| 20 | + |
| 21 | +(defn- path [x] |
| 22 | + (.toString (java.nio.file.Paths/get x (into-array String nil)))) |
| 23 | + |
| 24 | +(task-options! |
| 25 | + pom {:project 'cljsjs/ag-grid-community |
| 26 | + :version +version+ |
| 27 | + :description "The JavaScript Datagrid for Enterprise" |
| 28 | + :url "http://ag-grid.com/" |
| 29 | + :scm {:url "https://github.com/cljsjs/packages"} |
| 30 | + :license {"MIT" "http://opensource.org/licenses/MIT"}}) |
| 31 | + |
| 32 | +(deftask download-lib [] |
| 33 | + (download :url (format "https://github.com/ceolter/ag-grid/archive/%s.zip" +lib-version+) |
| 34 | + :checksum +lib-checksum+ |
| 35 | + :unzip true)) |
| 36 | + |
| 37 | +(deftask package [] |
| 38 | + (comp |
| 39 | + (download-lib) |
| 40 | + (sift :move {#".*ag-grid-community/dist/ag-grid-community.js" "cljsjs/ag-grid-community/development/ag-grid-community.inc.js" |
| 41 | + #".*ag-grid-community/dist/styles/ag-grid.css" "cljsjs/ag-grid-community/development/ag-grid.inc.css" |
| 42 | + #".*ag-grid-community/dist/styles/compiled-icons.css" "cljsjs/ag-grid-community/development/compiled-icons.inc.css" |
| 43 | + #".*ag-grid-community/dist/styles/ag-theme-balham.css" "cljsjs/ag-grid-community/development/ag-theme-balham.inc.css" |
| 44 | + #".*ag-grid-community/dist/styles/ag-theme-balham-dark.css" "cljsjs/ag-grid-community/development/ag-theme-balham-dark.inc.css" |
| 45 | + #".*ag-grid-community/dist/styles/ag-theme-blue.css" "cljsjs/ag-grid-community/development/ag-theme-blue.inc.css" |
| 46 | + #".*ag-grid-community/dist/styles/ag-theme-bootstrap.css" "cljsjs/ag-grid-community/development/ag-theme-bootstrap.inc.css" |
| 47 | + #".*ag-grid-community/dist/styles/ag-theme-dark.css" "cljsjs/ag-grid-community/development/ag-theme-dark.inc.css" |
| 48 | + #".*ag-grid-community/dist/styles/ag-theme-fresh.css" "cljsjs/ag-grid-community/development/ag-theme-fresh.inc.css" |
| 49 | + #".*ag-grid-community/dist/styles/ag-theme-material.css" "cljsjs/ag-grid-community/development/ag-theme-material.inc.css"}) |
| 50 | + (sift :include #{#"^cljsjs"}) |
| 51 | + (minify :in "cljsjs/ag-grid-community/development/ag-grid-community.inc.js" |
| 52 | + :out "cljsjs/ag-grid-community/production/ag-grid-community.min.inc.js" |
| 53 | + :lang :ecmascript5) |
| 54 | + |
| 55 | + (minify :in "cljsjs/ag-grid-community/development/ag-grid.inc.css" |
| 56 | + :out "cljsjs/ag-grid-community/production/ag-grid.min.inc.css") |
| 57 | + (minify :in "cljsjs/ag-grid-community/development/compiled-icons.inc.css" |
| 58 | + :out "cljsjs/ag-grid-community/production/compiled-icons.min.inc.css") |
| 59 | + (minify :in "cljsjs/ag-grid-community/development/ag-theme-balham.inc.css" |
| 60 | + :out "cljsjs/ag-grid-community/production/ag-theme-balham.min.inc.css") |
| 61 | + (minify :in "cljsjs/ag-grid-community/development/ag-theme-balham-dark.inc.css" |
| 62 | + :out "cljsjs/ag-grid-community/production/ag-theme-balham-dark.min.inc.css") |
| 63 | + (minify :in "cljsjs/ag-grid-community/development/ag-theme-blue.inc.css" |
| 64 | + :out "cljsjs/ag-grid-community/production/ag-theme-blue.min.inc.css") |
| 65 | + (minify :in "cljsjs/ag-grid-community/development/ag-theme-bootstrap.inc.css" |
| 66 | + :out "cljsjs/ag-grid-community/production/ag-theme-bootstrap.min.inc.css") |
| 67 | + (minify :in "cljsjs/ag-grid-community/development/ag-theme-dark.inc.css" |
| 68 | + :out "cljsjs/ag-grid-community/production/ag-theme-dark.min.inc.css") |
| 69 | + (minify :in "cljsjs/ag-grid-community/development/ag-theme-fresh.inc.css" |
| 70 | + :out "cljsjs/ag-grid-community/production/ag-theme-fresh.min.inc.css") |
| 71 | + (minify :in "cljsjs/ag-grid-community/development/ag-theme-material.inc.css" |
| 72 | + :out "cljsjs/ag-grid-community/production/ag-theme-material.min.inc.css") |
| 73 | + (deps-cljs :name "cljsjs.ag-grid-community") |
| 74 | + (pom) |
| 75 | + (jar))) |
0 commit comments