Skip to content

Commit c058f78

Browse files
authored
Merge pull request #1 from Respo/colors
more color enums
2 parents becfa99 + 223726d commit c058f78

File tree

4 files changed

+392
-400
lines changed

4 files changed

+392
-400
lines changed

.github/workflows/check.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Moonbit
16+
uses: hustcer/setup-moonbit@v1
17+
# with:
18+
# version: "nightly"
19+
20+
# - uses: actions/setup-node@v4
21+
# with:
22+
# node-version: 20
23+
# cache: "yarn"
24+
25+
- name: moon check
26+
run: moon update && moon version && moon check --target js
27+
28+
# - name: moon info
29+
# run: |
30+
# moon info
31+
# git diff --exit-code
32+
33+
- name: moon test
34+
run: |
35+
moon build --target js --debug
36+
37+
# - name: "compiles to js"
38+
# run: yarn && yarn vite build --base=./
39+
40+
# - name: moon bundle
41+
# run: moon bundle
42+
43+
# - name: check core size
44+
# run: ls -alh `find ./target/bundle -name *.core`
45+
46+
# - name: format diff
47+
# run: |
48+
# moon fmt
49+
# git diff
50+
51+
# - name: Deploy to server
52+
# id: deploy
53+
# uses: Pendect/action-rsyncer@v2.0.0
54+
# env:
55+
# DEPLOY_KEY: ${{secrets.rsync_private_key}}
56+
# with:
57+
# flags: "-avzr --progress"
58+
# options: ""
59+
# ssh_options: ""
60+
# src: "dist/*"
61+
# dest: "rsync-user@tiye.me:/web-assets/repo/${{ github.repository }}"
62+
63+
# - name: Display status from deploy
64+
# run: echo "${{ steps.deploy.outputs.status }}"

README.mbt.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@ moon add tiye/respo_css
3030

3131
```moonbit
3232
// Create basic styles
33+
///|
3334
let style : RespoStyle = respo_style(
3435
color=CssColor::Red,
3536
font_size=16,
3637
margin=CssSize::Px(10.0),
37-
display=CssDisplay::Flex
38+
display=CssDisplay::Flex,
3839
)
3940
4041
// Convert to CSS string
42+
43+
///|
4144
let _css_string : String = style.to_string()
4245
// Output: "color:red; font-size:16px; margin:10px; display:flex; "
4346
```
@@ -46,13 +49,23 @@ let _css_string : String = style.to_string()
4649

4750
```moonbit
4851
// Create multiple styles
52+
///|
4953
let base_style : RespoStyle = respo_style(color=CssColor::Blue, font_size=14)
50-
let layout_style : RespoStyle = respo_style(display=CssDisplay::Grid, gap=CssSize::Px(20.0))
54+
55+
///|
56+
let layout_style : RespoStyle = respo_style(
57+
display=CssDisplay::Grid,
58+
gap=CssSize::Px(20.0),
59+
)
5160
5261
// Merge styles
62+
63+
///|
5364
let combined : RespoStyle = base_style.merge(layout_style)
5465
5566
// Add custom properties
67+
68+
///|
5669
let _extended : RespoStyle = combined.add("custom-property", "custom-value")
5770
```
5871

moon.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tiye/respo_css",
3-
"version": "0.1.0",
3+
"version": "0.1.2",
44
"readme": "README.mbt.md",
55
"repository": "git@github.com:Respo/respo_css.mbt.git",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)