Skip to content

Commit

Permalink
upgrade deps; send content to server
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Aug 4, 2024
1 parent 1970c1e commit 5813767
Show file tree
Hide file tree
Showing 8 changed files with 533 additions and 262 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,20 @@ jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'

- uses: supplypike/setup-bin@v3
- uses: calcit-lang/setup-[email protected]
with:
uri: 'https://github.com/calcit-lang/calcit/releases/download/0.8.0-a5/cr'
name: 'cr'
version: '0.8.0-a5'

- uses: supplypike/setup-bin@v3
with:
uri: 'https://github.com/calcit-lang/calcit/releases/download/0.8.0-a5/caps'
name: 'caps'
version: '0.8.0-a5'
version: "0.9.1"

- name: "compiles to js"
run: >
caps --ci && cr --emit-js --once
caps --ci && cr --once js
&& yarn && yarn vite build --base=./
- name: Deploy to server
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
js-out/
node_modules/
dist/

.DS_Store
112 changes: 109 additions & 3 deletions calcit.cirru

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 19 additions & 2 deletions compact.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
:home $ comp-editor (>> states :editor) (:content store)
:viewer $ comp-viewer (:content store)
comp-nav $ :name router
comp-upload $ :content store
when dev? $ comp-reel (>> states :reel) reel ({})
:ns $ %{} :CodeEntry (:doc |)
:code $ quote
Expand All @@ -30,7 +31,7 @@
reel.comp.reel :refer $ comp-reel
respo-md.comp.md :refer $ comp-md
app.config :refer $ dev?
app.comp.nav :refer $ comp-nav
app.comp.nav :refer $ comp-nav comp-upload
app.comp.editor :refer $ comp-editor
app.comp.viewer :refer $ comp-viewer
respo-ui.css :as css
Expand Down Expand Up @@ -95,9 +96,20 @@
defcomp comp-nav (current-page)
div
{} $ :class-name css-nav
=< 8 nil
comp-link :home :code $ = current-page :home
=< 8 nil
comp-link :viewer :monitor $ = current-page :viewer
|comp-upload $ %{} :CodeEntry (:doc |)
:code $ quote
defn comp-upload (content)
div
{}
:class-name $ str-spaced css-icon css-place-upload
:on-click $ fn (e d!) (hint-fn async)
js-await $ .!post axios "\"https://data-backs.chenyong.life/data/pudica-schedule-viewer" (to-js-data content)
js/alert "\"sent data to remote server."
comp-i :upload-cloud 16 $ hsl 200 80 70
|css-icon $ %{} :CodeEntry (:doc |)
:code $ quote
defstyle css-icon $ {}
Expand All @@ -110,6 +122,10 @@
{} (:position :absolute) (:bottom 0) (:right 0) (:padding 8) (:justify-content :flex-end)
:background-color $ hsl 0 0 96
:gap 4
|css-place-upload $ %{} :CodeEntry (:doc |)
:code $ quote
defstyle css-place-upload $ {}
"\"$0" $ {} (:position :absolute) (:top 8) (:right 8)
:ns $ %{} :CodeEntry (:doc |)
:code $ quote
ns app.comp.nav $ :require
Expand All @@ -120,6 +136,7 @@
respo-md.comp.md :refer $ comp-md
feather.core :refer $ comp-i
respo.css :refer $ defstyle
"\"axios" :default axios
|app.comp.viewer $ %{} :FileEntry
:defs $ {}
|by-larger $ %{} :CodeEntry (:doc |)
Expand Down Expand Up @@ -377,7 +394,7 @@
println "|App started."
|mount-target $ %{} :CodeEntry (:doc |)
:code $ quote
def mount-target $ .querySelector js/document |.app
def mount-target $ js/document.querySelector |.app
|reload! $ %{} :CodeEntry (:doc |)
:code $ quote
defn reload! () $ if (nil? build-errors)
Expand Down
10 changes: 10 additions & 0 deletions deps.cirru
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

{}
:dependencies $ {}
|calcit-lang/lilac |0.5.0
|calcit-lang/memof |0.0.16
|Respo/respo.calcit |0.16.10
|Respo/reel.calcit |0.6.3
|Respo/respo-markdown.calcit |0.4.2
|Respo/respo-ui.calcit |0.6.2
|Respo/respo-feather.calcit |0.4.0-a1
10 changes: 0 additions & 10 deletions package.cirru

This file was deleted.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"license": "MIT",
"devDependencies": {
"bottom-tip": "^0.1.5",
"vite": "^4.4.12"
"vite": "^5.3.5"
},
"dependencies": {
"@calcit/procs": "^0.8.0-a5",
"dayjs": "^1.11.9",
"feather-icons": "^4.29.1",
"shortid": "^2.2.16"
"@calcit/procs": "^0.9.1",
"axios": "^1.7.3",
"dayjs": "^1.11.12",
"feather-icons": "^4.29.2"
}
}
Loading

0 comments on commit 5813767

Please sign in to comment.