Skip to content

Commit

Permalink
feat: build typescript sdk into output/typescript directory
Browse files Browse the repository at this point in the history
  • Loading branch information
letzabelin committed Feb 6, 2024
1 parent eb9758e commit 0f8480a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ cache
*.iml
test_dir
fhir-schema
output

# Added by cargo

Expand Down
9 changes: 6 additions & 3 deletions src/generator/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
[zen.core]
[zen.package]
[zen.store]
[zen.utils]))
[zen.utils]
[dotenv :as dotenv]))


(defn deep-merge-with
Expand Down Expand Up @@ -280,7 +281,9 @@
(shell/with-sh-dir (io/file path "package" "lib")
(apply shell/sh (if win? ["powershell" "npm" "pack"] ["npm" "pack"])))
(with-open [in (io/input-stream (io/file path "package" "lib" "aidbox-javascript-sdk-1.0.0.tgz"))]
(io/copy in (io/file path ".." "aidbox-javascript-sdk-1.0.0.tgz")))
(let [file (io/file (dotenv/env :typescript-output-path) "aidbox-javascript-sdk-1.0.0.tgz")]
(io/make-parents file)
(io/copy in file)))
(println "[sdk] Cleanup folder")
(rm-r (io/file path "package"))
(println "[types] Generating done"))))
Expand All @@ -292,7 +295,7 @@
(require ['zen.cli])


(-> (zen.cli/get-pwd {:pwd "/Users/alexanderstreltsov/work/hs/aidbox-sdk-js/examples/zen-project"})
(-> (zen.cli/get-pwd {:pwd "zen-project"})
sdk))


0 comments on commit 0f8480a

Please sign in to comment.