diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6fc64ae --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI + +on: [push] + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +env: + RUSTFLAGS: --deny warnings + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + with: + components: clippy, rustfmt + - uses: swatinem/rust-cache@v2 + - run: cargo fmt --check + - run: cargo build + - run: cargo check + - run: cargo lint --all-targets + - run: cargo test diff --git a/README.md b/README.md index d3a8015..526e7e3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,33 @@ # jrsx -A JSX-like superset of [Askama][1]. +![CI](https://github.com/cvng/jrsx/actions/workflows/ci.yml/badge.svg?branch=main) + +A clean `JSX` syntax for your [Askama][1] templates. + +
Before: |
+ +```html +{%- import "hello.html" as hello_scope -%} +{%- import "child.html" as child_scope -%} + +{% call hello_scope::hello(name) %} +{% call hello_scope::hello(name=name) %} +{% call hello_scope::hello(name="world") %} +{% call child_scope::child() %}Super!{% endcall %} +``` + |
After: |
+
+```html
+ |