Skip to content

Commit 9222f47

Browse files
committed
[ag-grid] Add ag-grid community, enterprise and react version 19.0.0
1 parent 66b4c31 commit 9222f47

File tree

9 files changed

+11116
-81
lines changed

9 files changed

+11116
-81
lines changed

ag-grid-community/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# cljsjs/ag-grid-community - The JavaScript Datagrid for Enterprise
2+
3+
React Toolbox depends on React with Addons, so, to be able to use it, you not only have to depend in
4+
cljsjs/ag-grid-community:
5+
6+
[](dependency)
7+
```clojure
8+
[cljsjs/ag-grid "19.0.0-0"] ;; latest release
9+
```
10+
[](/dependency)
11+
12+
This jar comes with `deps.cljs` as used by the [Foreign Libs][flibs] feature
13+
of the ClojureScript compiler. After adding the above dependency to your project
14+
you can require the packaged library like:
15+
16+
```clojure
17+
(ns application.core
18+
(:require [cljsjs.ag-grid]))
19+
```
20+
21+
[flibs]: https://clojurescript.org/reference/packaging-foreign-deps
22+
23+
## Upgrading
24+
25+
When upgrading ag-grid, you need to regenerate the externs:
26+
1. Go to https://cdnjs.com/libraries/ag-grid/<THE-VERSION> such as https://cdnjs.com/libraries/ag-grid/10.0.1
27+
2. Find the URL for ag-grid.js, such as: https://cdnjs.cloudflare.com/ajax/libs/ag-grid/8.2.0/ag-grid.js
28+
3. Go to http://jmmk.github.io/javascript-externs-generator
29+
4. Paste the URL for ag-grid.js and click load.
30+
5. Name the JavaScript object agGrid.
31+
6. Click "Extern!"
32+
6. Copy the JavaScript value to resources/cljsjs/ag-grid/common/ag-grid.ext.js

ag-grid-community/build.boot

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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

Comments
 (0)