Skip to content

Commit 1c3c79e

Browse files
committed
add instruction about deploying the projec to clojars
1 parent 81b4d99 commit 1c3c79e

File tree

8 files changed

+78
-26
lines changed

8 files changed

+78
-26
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{:lint-as {net.coruscation.js4clj.require/require-js clojure.core/require}}
1+
{:lint-as {net.coruscation.js4clj.require/require-js clojure.core/require, net.coruscation.js4clj.require/require-cjs clojure.core/require}}

.dir-locals.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
;;; Directory Local Variables -*- no-byte-compile: t -*-
22
;;; For more information see (info "(emacs) Directory Variables")
33

4-
((nil . ((cider-clojure-cli-aliases . ":test:example"))))
4+
((nil . ((cider-clojure-cli-aliases . ":test:example:customized-graal:build"))))

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ NOTES.org
3131
# Edit at https://www.toptal.com/developers/gitignore?templates=java,clojure,commonlisp,emacs
3232

3333
### Clojure ###
34-
pom.xml
35-
pom.xml.asc
3634
*.jar
3735
*.class
3836
/lib/

build.clj

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121

2222
(defn- jar-opts [opts]
2323
(assoc opts
24-
:lib lib :version version
25-
:jar-file (format "target/%s-%s.jar" lib version)
26-
:scm {:tag (str "v" version)}
27-
:basis (b/create-basis {})
28-
:class-dir class-dir
29-
:target "target"
30-
:src-dirs ["src"]))
24+
:lib lib :version version
25+
:jar-file (format "target/%s-%s.jar" lib version)
26+
:scm {:tag (str "v" version)}
27+
:basis (b/create-basis {})
28+
:class-dir class-dir
29+
:src-pom "./pom.xml"
30+
:target "target"
31+
:src-dirs ["src"]))
3132

32-
(defn ci "Run the CI pipeline of tests (and build the JAR)." [opts]
33-
(test opts)
33+
(defn jar "build the JAR" [& [opts]]
3434
(b/delete {:path "target"})
3535
(let [opts (jar-opts opts)]
3636
(println "\nWriting pom.xml...")
@@ -41,12 +41,16 @@
4141
(b/jar opts))
4242
opts)
4343

44+
(defn ci "Run the CI pipeline of tests (and build the JAR)." [opts]
45+
(test opts)
46+
(jar opts))
47+
4448
(defn install "Install the JAR locally." [opts]
4549
(let [opts (jar-opts opts)]
4650
(b/install opts))
4751
opts)
4852

49-
(defn deploy "Deploy the JAR to Clojars." [opts]
53+
(defn deploy "Deploy the JAR to Clojars." [& [opts]]
5054
(let [{:keys [jar-file] :as opts} (jar-opts opts)]
5155
(dd/deploy {:installer :remote :artifact (b/resolve-path jar-file)
5256
:pom-file (b/pom-path (select-keys opts [:lib :class-dir]))}))

deps.edn

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,29 @@
22
:deps {org.clojure/clojure {:mvn/version "1.12.3"}
33
org.clojure/core.async {:mvn/version "1.8.741"}
44
org.graalvm.polyglot/polyglot {:mvn/version "25.0.1"}
5-
org.graalvm.js/js-language {:local/root "jar/js-language-25.0.1-dev-20251121.165319-1.jar"}
65
org.graalvm.truffle/truffle-runtime {:mvn/version "25.0.1"}
7-
cheshire/cheshire {:mvn/version "6.1.0"}
8-
org.graalvm.regex/regex {:mvn/version "25.0.1"}
9-
org.graalvm.truffle/truffle-api {:mvn/version "25.0.1"}
10-
org.graalvm.shadowed/icu4j {:mvn/version "25.0.1"}}
6+
org.graalvm.js/js-language {:mvn/version "25.0.1"}}
117
:aliases
12-
{:cljs {:extra-deps {thheller/shadow-cljs {:mvn/version "3.2.1"}}}
8+
{:customized-graal {:extra-deps
9+
{org.graalvm.js/js-language {:local/root "jar/js-language-25.0.1-dev-20251121.165319-1.jar"}
10+
org.graalvm.regex/regex {:mvn/version "25.0.1"}
11+
org.graalvm.truffle/truffle-api {:mvn/version "25.0.1"}
12+
org.graalvm.shadowed/icu4j {:mvn/version "25.0.1"}}}
13+
:cljs {:extra-deps {thheller/shadow-cljs {:mvn/version "3.2.1"}}}
1314
:test {:extra-paths ["test"]
1415
:extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}
1516
io.github.cognitect-labs/test-runner
1617
{:git/tag "v0.5.1" :git/sha "dfb30dd"}}}
17-
:build {:deps {io.github.clojure/tools.build
18-
{:git/tag "v0.9.2" :git/sha "fe6b140"}
19-
slipset/deps-deploy {:mvn/version "0.2.0"}}
20-
:ns-default build}
21-
:neil {:project {:name net.coruscation/js4clj}}
2218
:example {:extra-paths ["example"]
2319
:extra-deps {hiccup/hiccup {:mvn/version "2.0.0"}
2420
ring/ring-core {:mvn/version "1.15.3"}
2521
ring-cors/ring-cors {:mvn/version "0.1.13"}
2622
ring/ring-jetty-adapter {:mvn/version "1.15.3"}}}
23+
:build {:deps {io.github.clojure/tools.build
24+
{:git/tag "v0.9.2" :git/sha "fe6b140"}
25+
slipset/deps-deploy {:mvn/version "0.2.0"}}
26+
:ns-default build}
27+
:neil {:project {:name net.coruscation/js4clj}}
2728
:codox {:extra-deps {codox/codox {:mvn/version "0.10.8"}}
2829
:exec-fn codox.main/generate-docs
2930
:exec-args {:name "net.coruscation.js4clj"

pom.xml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>net.coruscation</groupId>
5+
<artifactId>js4clj</artifactId>
6+
<version>0.1.0</version>
7+
<name>net.coruscation/js4clj</name>
8+
<description>Using JavaScript in JVM with Clojure by GraalJS </description>
9+
<url>https://github.com/imakira/js4clj</url>
10+
<licenses>
11+
<license>
12+
<name>Eclipse Public License</name>
13+
<url>http://www.eclipse.org/legal/epl-v10.html</url>
14+
</license>
15+
</licenses>
16+
<developers>
17+
<developer>
18+
<name>Akira Yang</name>
19+
<email>[email protected]</email>
20+
<url>https://coruscation.net/</url>
21+
</developer>
22+
</developers>
23+
<scm>
24+
<url>https://github.com/imakira/js4clj</url>
25+
<connection>scm:git:[email protected]:imakira/js4clj.git</connection>
26+
<developerConnection>scm:git:[email protected]:imakira/js4clj.git</developerConnection>
27+
<tag>v0.1.0</tag>
28+
</scm>
29+
<build>
30+
<sourceDirectory>src</sourceDirectory>
31+
</build>
32+
<repositories>
33+
<repository>
34+
<id>clojars</id>
35+
<url>https://repo.clojars.org/</url>
36+
</repository>
37+
<repository>
38+
<id>sonatype</id>
39+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
40+
</repository>
41+
</repositories>
42+
<distributionManagement>
43+
<repository>
44+
<id>clojars</id>
45+
<name>Clojars repository</name>
46+
<url>https://clojars.org/repo</url>
47+
</repository>
48+
</distributionManagement>
49+
</project>

secrets.env.gpg

556 Bytes
Binary file not shown.

shadow-cljs.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{:deps {:aliases [:cljs :example :test]}
1+
{:deps {:aliases [:customized-graal :cljs :example :test]}
22
:dev-http {8080 {:roots ["public"]}}
33
:builds {:app
44
{:target :browser

0 commit comments

Comments
 (0)