established cljs
This commit is contained in:
parent
b7bc7da053
commit
f62baf0cd0
11 changed files with 73 additions and 11 deletions
|
@ -4,7 +4,19 @@ stages:
|
|||
- security
|
||||
- upload
|
||||
|
||||
.clj-uploadjob: &clj
|
||||
.cljs-job: &cljs
|
||||
image: domaindrivenarchitecture/shadow-cljs
|
||||
cache:
|
||||
key: ${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- node_modules/
|
||||
- .shadow-cljs/
|
||||
- .m2
|
||||
before_script:
|
||||
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
|
||||
- npm install
|
||||
|
||||
.clj-job: &clj
|
||||
image: domaindrivenarchitecture/lein
|
||||
cache:
|
||||
key: ${CI_COMMIT_REF_SLUG}
|
||||
|
@ -20,6 +32,12 @@ test-clj:
|
|||
script:
|
||||
- lein test
|
||||
|
||||
test-cljs:
|
||||
<<: *cljs
|
||||
stage: build_and_test
|
||||
script:
|
||||
- shadow-cljs compile test
|
||||
|
||||
upload-clj-prerelease:
|
||||
<<: *clj
|
||||
stage: upload
|
||||
|
|
32
package.json
Normal file
32
package.json
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"name": "c4k-common",
|
||||
"description": "Contains predicates and tools for c4k",
|
||||
"author": "meissa GmbH",
|
||||
"version": "0.1.0-SNAPSHOT",
|
||||
"homepage": "https://gitlab.com/domaindrivenarchitecture/c4k-common#readme",
|
||||
"repository": "https://www.npmjs.com/package/c4k-common",
|
||||
"license": "APACHE2",
|
||||
"main": "c4k-common.js",
|
||||
"bin": {
|
||||
"c4k-common": "./c4k-common.js"
|
||||
},
|
||||
"keywords": [
|
||||
"cljs",
|
||||
"k8s",
|
||||
"c4k",
|
||||
"deployment",
|
||||
"yaml",
|
||||
"convention4kubernetes"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://gitlab.com/domaindrivenarchitecture/c4k-common/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"js-base64": "^3.6.1",
|
||||
"js-yaml": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"shadow-cljs": "^2.11.18",
|
||||
"source-map-support": "^0.5.19"
|
||||
}
|
||||
}
|
|
@ -16,7 +16,8 @@
|
|||
["releases" :clojars]]
|
||||
:deploy-repositories [["snapshots" :clojars]
|
||||
["releases" :clojars]]
|
||||
:profiles {:test {:test-paths ["src/test/cljc"]
|
||||
:profiles {:test {:test-paths ["src/test/clj"
|
||||
"src/test/cljc"]
|
||||
:resource-paths ["src/test/resources"]
|
||||
:dependencies [[dda/data-test "0.1.1"]]}
|
||||
:dev {:plugins [[lein-shell "0.5.0"]]}}
|
||||
|
|
12
shadow-cljs.edn
Normal file
12
shadow-cljs.edn
Normal file
|
@ -0,0 +1,12 @@
|
|||
{:source-paths ["src/main/cljc"
|
||||
"src/main/cljs"
|
||||
"src/main/resources"
|
||||
"src/test/cljc"
|
||||
"src/test/resources"]
|
||||
:dependencies [[aero "1.1.6"]
|
||||
[orchestra "2021.01.01-1"]
|
||||
[expound "0.8.9"]]
|
||||
:builds {:test {:target :node-test
|
||||
:output-to "target/node-tests.js"
|
||||
:autorun true
|
||||
:repl-pprint true}}}
|
|
@ -1,4 +1,4 @@
|
|||
(ns dda.c4k_common.base64
|
||||
(ns dda.c4k-common.base64
|
||||
(:import (java.util Base64)))
|
||||
|
||||
(defn encode
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(ns dda.c4k_common.yaml
|
||||
(ns dda.c4k-common.yaml
|
||||
(:require
|
||||
[clojure.java.io :as io]
|
||||
[clj-yaml.core :as yaml]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(ns dda.c4k_common.common
|
||||
(ns dda.c4k-common.common
|
||||
(:require
|
||||
[clojure.walk]))
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(ns dda.c4k_common.base64
|
||||
(ns dda.c4k-common.base64
|
||||
(:require
|
||||
["js-base64" :as b64]))
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
(ns dda.c4k_common.browser
|
||||
(ns dda.c4k-common.browser
|
||||
(:require
|
||||
[clojure.string :as st]
|
||||
[clojure.spec.alpha :as s]
|
||||
[clojure.tools.reader.edn :as edn]
|
||||
[expound.alpha :as expound]
|
||||
[orchestra.core :refer-macros [defn-spec]]))
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(ns dda.c4k_common.yaml
|
||||
(ns dda.c4k-common.yaml
|
||||
(:require
|
||||
["js-yaml" :as yaml]
|
||||
[shadow.resource :as rc]))
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
(ns dda.c4k_common.yaml-test
|
||||
(ns dda.c4k-common.yaml-test
|
||||
(:require
|
||||
#?(:clj [clojure.test :refer [deftest is are testing run-tests]]
|
||||
:cljs [cljs.test :refer-macros [deftest is are testing run-tests]])
|
||||
[dda.c4k_common.yaml :as cut]))
|
||||
[dda.c4k-common.yaml :as cut]))
|
||||
|
||||
(deftest should-parse-yaml-string
|
||||
(is (= {:hallo "welt"}
|
||||
|
|
Loading…
Reference in a new issue