Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ node_modules
yarn.lock
package-lock.json
dist
cache
cache
10 changes: 10 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Deploy the docs to the `docs` branch.
git branch -D docs-preview
git checkout -b docs-preview
# sed -i '' '/dist/d' .gitignore
sed -i '' '/docs\/.vitepress\/lib/d' .gitignore
# npm run build
git add .
git commit -m "Update docs"
git push origin docs-preview -f
git checkout -
1 change: 1 addition & 0 deletions docs/.vitepress/lib/charming-cell.umd.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/.vitepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import DefaultTheme from "vitepress/theme";
import Layout from "genji-theme-vitepress";
import { h } from "vue";
import "../lib/charming-cell.umd.min.js";

// More props: https://genji-md.dev/reference/props
const props = {
Expand Down
6 changes: 6 additions & 0 deletions docs/cell/getting-started.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# Getting Started

> WIP

```bash
npm install @charming-art/cell
```
16 changes: 15 additions & 1 deletion docs/cell/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
# Charming Cell
# Charming Cell

The P5 like JavaScript API for ASCII art.

> [!NOTE]
> The current next branch is implementing the new proposal API for production use. Please refer to the [python branch](https://github.com/charming-art/charming-cell/tree/python) for the released Python version.

## Resources 📚

- Documentation - https://charmingjs.org/cell/
- Examples - https://observablehq.com/d/18b3d6f3affff5bb

## License 📄

ISC@Bairui SU
16 changes: 16 additions & 0 deletions docs/cell/what-is-cell.md
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
# What is Cell?

```js eval
cm.cell((ctx) => ({
mode: "double",
width: 520,
height: 520,
setup() {
for (let t = 0; t <= Math.PI * 2; t += Math.PI / 120) {
const x = ctx.cols() / 2 + 12 * Math.cos(t) * Math.cos(t * 3);
const y = ctx.rows() / 2 + 12 * Math.sin(t) * Math.cos(t * 3);
ctx.stroke(cm.wide("🌟"));
ctx.point(x, y);
}
},
}));
```
6 changes: 6 additions & 0 deletions docs/flow/getting-started.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# Getting Started

> WIP

```bash
npm install @charming-art/cell
```
2 changes: 2 additions & 0 deletions docs/flow/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Charming Flow

The functional JavaScript API for graphics.
6 changes: 6 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# Getting Started

> WIP

```bash
npm install @charming-art/charming
```
2 changes: 2 additions & 0 deletions docs/lodash/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Charming Lodash

The helpful utils for graphics and geometries.
2 changes: 2 additions & 0 deletions docs/what-is-charming.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# What is Charming?

The JavaScript library for tailored creative coding.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"test": "echo \"Error: no test specified\" && exit 1",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
"docs:preview": "vitepress preview docs",
"docs:deploy": "bash ./deploy.sh"
},
"keywords": [],
"author": "",
Expand All @@ -16,4 +17,4 @@
"genji-theme-vitepress": "^0.2.6",
"vitepress": "^1.3.4"
}
}
}