-
Notifications
You must be signed in to change notification settings - Fork 0
chore: update docs and pre publish script #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [](https://crates.io/crates/grimoire_css) | ||
| [](https://crates.io/crates/grimoire_css) | ||
| [](https://github.com/persevie/grimoire-css/actions/workflows/quality.yml) | ||
| [](https://codecov.io/github/persevie/grimoire-css) | ||
|  | ||
|
|
||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # The Arcane Circle | ||
|
|
||
| Grimoire CSS gives you the freedom to create styles that work exactly the way you want them to - no rigid rules or constraints. Whether you’re crafting dynamic interactions or fine-tuning layouts, Grimoire adapts to your needs, making each step straightforward and rewarding. | ||
|
|
||
| So, come join us. Share your work, exchange your thoughts, and help us keep pushing CSS to be more flexible and enjoyable. | ||
|
|
||
| The Arcane Circle, or simply the Circle, is a place where you can share your configs, scrolls, variables, components, or UI kits. It’s where you can catch the latest news, follow development, influence the project, and interact with other members of the Circle. | ||
|
|
||
| > The Circle is currently under development. | ||
|
|
||
| ## The First Member | ||
|
|
||
| Hello! My name is [Dmitrii Shatokhin](https://dmtrshat.github.io/), and I am the creator of Grimoire CSS. I invented the Spell concept and all the other ideas behind the project. Grimoire CSS is the result of countless hours of work and dedication, and I am proud to have made it open source. | ||
|
|
||
| But this is just the beginning. I am committed to the ongoing development of Grimoire CSS and its entire ecosystem - there are many plans and tasks ahead, which I strive to manage transparently on GitHub. My vision is to grow the Arcane Circle community and bring all these ideas to life. | ||
|
|
||
| I would be truly grateful for any support you can offer - whether it’s starring the project on GitHub, leaving feedback, recommending it to others, contributing to its development, helping to promote Grimoire CSS, or even sponsoring the project or my work. | ||
|
|
||
| Thank you! | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| > For the best experience and access to online playground and transmutator (aka **Desk**), please visit the [Grimoire CSS site](https://grimoirecss.com). The documentation is the same in both places. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <div align="center"> | ||
| <img height="128" alt="Grimoire CSS logo" src="./assets/grimoire-css-logo.svg"> | ||
| </div> | ||
|
|
||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| > For the best experience and access to advanced features like playgrounds and interactive previews, please visit the [Grimoire CSS site](https://grimoirecss.com). The documentation is the same in both places. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Release Information | ||
|
|
||
| ## Release Notes | ||
|
|
||
| For detailed information about each release, including new features, improvements, and breaking changes, see our [Release Notes](https://github.com/persevie/grimoire-css/blob/main/RELEASES.md). | ||
|
|
||
| ### Changelog | ||
|
|
||
| A concise list of version-specific changes can be found in our [Changelog](https://github.com/persevie/grimoire-css/blob/main/CHANGELOG.md). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Craft Your Code, Cast Your Spells |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Pre-publish helper: generate animations list and compose README.md from content blocks. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" && pwd) | ||
| REPO_ROOT=$(cd "$SCRIPT_DIR/.." && pwd) | ||
| CONTENT_DIR="$REPO_ROOT/content" | ||
| ANIM_CSS_DIR="$REPO_ROOT/src/core/animations/css" | ||
|
|
||
| echo "[pre_publish] repo_root=$REPO_ROOT" | ||
|
|
||
| # 1) Create content/animations.txt from src/core/animations/css using ls (remove .css) | ||
| # Keep it sorted and handle the case when no files exist. | ||
| animations_txt="$CONTENT_DIR/animations.txt" | ||
| { | ||
| shopt -s nullglob | ||
| css_files=("$ANIM_CSS_DIR"/*.css) | ||
| if ((${#css_files[@]})); then | ||
| for f in "${css_files[@]}"; do | ||
| bname=$(basename "$f") | ||
| printf '%s\n' "${bname%.css}" | ||
| done | LC_ALL=C sort | ||
| fi | ||
| } > "$animations_txt" | ||
| echo "[pre_publish] generated $(wc -l < "$animations_txt") entries in content/animations.txt" | ||
|
|
||
| # 2) Insert animations from content/animations.txt into content/animations.md | ||
| # between the markers, adding "- " at the beginning of each line. | ||
| animations_md="$CONTENT_DIR/animations.md" | ||
| tmp_file="$animations_md.tmp" | ||
|
|
||
| awk -v list_file="$animations_txt" ' | ||
| BEGIN { | ||
| i = 0 | ||
| while ((getline l < list_file) > 0) { list[i++] = l } | ||
| close(list_file) | ||
| } | ||
| { | ||
| if (state == 1) { | ||
| # Skip lines until END marker, then print the new block and the END marker. | ||
| if ($0 ~ /<!--[[:space:]]*END[[:space:]]+ANIMATIONS[[:space:]]+LIST[[:space:]]*-->/) { | ||
| for (j=0; j<i; j++) print "- " list[j] | ||
| state = 0 | ||
| } | ||
| next | ||
| } | ||
| if ($0 ~ /<!--[[:space:]]*START[[:space:]]+ANIMATIONS[[:space:]]+LIST[[:space:]]*-->/) { | ||
| state = 1 | ||
| } | ||
| } | ||
| ' "$animations_md" > "$tmp_file" && mv "$tmp_file" "$animations_md" | ||
| echo "[pre_publish] updated content/animations.md with bulleted list" | ||
|
|
||
| # 3) Build README.md by inserting content files into blocks in content/about.md | ||
| about_md="$CONTENT_DIR/about.md" | ||
| readme_md="$REPO_ROOT/README.md" | ||
|
|
||
| awk \ | ||
| -v hero="$CONTENT_DIR/hero_image.md" \ | ||
| -v note="$CONTENT_DIR/note.md" \ | ||
| -v badges="$CONTENT_DIR/badges.md" \ | ||
| -v animsec="$CONTENT_DIR/animations.md" \ | ||
| -v desk="$CONTENT_DIR/desk.md" \ | ||
| -v circle="$CONTENT_DIR/circle.md" \ | ||
| -v release="$CONTENT_DIR/release_info.md" \ | ||
| -v slogan="$CONTENT_DIR/slogan.md" ' | ||
| function print_file(path, line, opened) { | ||
| # Print file only if it exists and is readable. | ||
| if ((getline line < path) <= 0) { close(path); return } | ||
| print line | ||
| while ((getline line < path) > 0) print line | ||
| close(path) | ||
| } | ||
| { | ||
| if (skip) { | ||
| # Pass through until any END marker for safety (sections are not nested). | ||
| if ($0 ~ /<!--[[:space:]]*END[[:space:]]+[A-Z][A-Z ]*[[:space:]]*-->/) { | ||
| skip = 0 | ||
| } | ||
| next | ||
| } | ||
|
|
||
| # Section handlers: print START, inject file content, then skip until END. | ||
| if ($0 ~ /<!--[[:space:]]*START[[:space:]]+HERO[[:space:]]+IMAGE[[:space:]]*-->/) { print; print_file(hero); skip=1; next } | ||
| if ($0 ~ /<!--[[:space:]]*START[[:space:]]+NOTE[[:space:]]*-->/) { print; print_file(note); skip=1; next } | ||
| if ($0 ~ /<!--[[:space:]]*START[[:space:]]+BADGES[[:space:]]*-->/) { print; print_file(badges); skip=1; next } | ||
| if ($0 ~ /<!--[[:space:]]*START[[:space:]]+ANIMATIONS[[:space:]]+SECTION[[:space:]]*-->/) { print; print_file(animsec); skip=1; next } | ||
| if ($0 ~ /<!--[[:space:]]*START[[:space:]]+DESK[[:space:]]*-->/) { print; print_file(desk); skip=1; next } | ||
| if ($0 ~ /<!--[[:space:]]*START[[:space:]]+CIRCLE[[:space:]]*-->/) { print; print_file(circle); skip=1; next } | ||
| if ($0 ~ /<!--[[:space:]]*START[[:space:]]+RELEASE[[:space:]]+INFO[[:space:]]*-->/) { print; print_file(release); skip=1; next } | ||
| if ($0 ~ /<!--[[:space:]]*START[[:space:]]+SLOGAN[[:space:]]*-->/) { print; print_file(slogan); skip=1; next } | ||
|
|
||
| } | ||
| ' "$about_md" > "$readme_md" | ||
|
|
||
| echo "[pre_publish] generated README.md from content/about.md" | ||
|
|
||
| # 4) Update Table of Contents in README.md using doctoc (if available) | ||
| if command -v doctoc >/dev/null 2>&1; then | ||
| echo "[pre_publish] running doctoc on README.md" | ||
| doctoc --github "$readme_md" || echo "[pre_publish] doctoc encountered an error but continuing" | ||
dmtrshat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| elif command -v npx >/dev/null 2>&1; then | ||
| echo "[pre_publish] running npx doctoc on README.md" | ||
| npx -y doctoc --github "$readme_md" || echo "[pre_publish] npx doctoc encountered an error but continuing" | ||
dmtrshat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| else | ||
| echo "[pre_publish] doctoc not found. Skipping TOC update. Install with: npm i -g doctoc" >&2 | ||
dmtrshat marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| fi | ||
|
|
||
| echo "[pre_publish] done." | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.