Skip to content

Commit 2df1852

Browse files
committed
Migrate to lein-shadow plugin
1 parent 71de217 commit 2df1852

8 files changed

+28
-1741
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ orbs:
2727
command: sudo npm install -g karma-cli
2828

2929
- run:
30-
command: lein ci
30+
command: lein test-once
3131

3232
- save_cache:
3333
paths:

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55
/target/
66
/node_modules/
77
/.shadow-cljs/
8+
/package.json
9+
/shadow-cljs.edn
810
/resources/public/js/test/

karma.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = function (config) {
44
config.set({
55
browsers: ['ChromeHeadless'],
66
basePath: 'target',
7-
files: ['ci.js'],
7+
files: ['karma-test.js'],
88
frameworks: ['cljs-test'],
99
plugins: [
1010
'karma-cljs-test',

package.json

-17
This file was deleted.

project.clj

+19-6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
[karma-reporter "3.1.0"]]
1414
:plugins [[lein-shell "0.5.0"]]}}
1515

16+
:plugins [[lein-shadow "0.1.5"]]
17+
1618
:clean-targets [:target-path
1719
"resources/public/js/test"]
1820

@@ -23,12 +25,23 @@
2325

2426
:test-paths ["test"]
2527

26-
:aliases {"dev" ["do"
27-
["shell" "npm" "install"]
28-
["with-profile" "dev" "run" "-m" "shadow.cljs.devtools.cli" "watch" "browser-test"]]
29-
"ci" ["do"
30-
["shell" "npm" "install"]
31-
["run" "-m" "shadow.cljs.devtools.cli" "compile" "ci"]
28+
:shadow-cljs {:nrepl {:port 8777}
29+
30+
:builds {:browser-test
31+
{:target :browser-test
32+
:ns-regexp "-test$"
33+
:test-dir "resources/public/js/test"
34+
:devtools {:http-root "resources/public/js/test"
35+
:http-port 8290}}
36+
37+
:karma-test
38+
{:target :karma
39+
:ns-regexp "-test$"
40+
:output-to "target/karma-test.js"}}}
41+
42+
:aliases {"dev-auto" ["with-profile" "dev" "shadow" "watch" "browser-test"]
43+
"test-once" ["do"
44+
["shadow" "compile" "karma-test"]
3245
["shell" "karma" "start" "--single-run" "--reporters" "junit,dots"]]}
3346

3447
:deploy-repositories [["clojars" {:sign-releases false

shadow-cljs.edn

-16
This file was deleted.

src/deps.cljs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{:npm-dev-deps {"shadow-cljs" "2.8.51"
2+
"karma" "4.2.0"
3+
"karma-chrome-launcher" "3.1.0"
4+
"karma-cljs-test" "0.1.0"
5+
"karma-junit-reporter" "1.2.0"}}

0 commit comments

Comments
 (0)