Skip to content

Commit 27405d6

Browse files
authored
Merge pull request #575 from pixijs/feat/docs
feat: doc updates
2 parents 62993db + 87740b5 commit 27405d6

File tree

115 files changed

+33233
-11721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+33233
-11721
lines changed

.codesandbox/ci.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.codesandbox/sandbox/index.jsx

Lines changed: 0 additions & 1 deletion
This file was deleted.

.codesandbox/sandbox/package.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

.codesandbox/sandbox/src/index.tsx

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

.github/workflows/deploy-docs.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- docs
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
deploy:
15+
name: Deploy
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
cache: 'npm'
24+
25+
- run: npm ci
26+
- run: |
27+
git config --global user.name "$GITHUB_ACTOR"
28+
git config --global user.email "[email protected]"
29+
git remote set-url origin https://git:${GIT_PASS}@github.com/pixijs/pixi-react.git
30+
npm run deploy
31+
env:
32+
GIT_USER: $GITHUB_ACTOR
33+
GIT_PASS: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/handle-release-branch-push.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ jobs:
1212
strategy:
1313
matrix:
1414
script:
15-
# - name: Typecheck
16-
# command: test:types
15+
- name: Typecheck
16+
command: test:types
17+
installPlaywright: false
1718
- name: Lint
1819
command: test:lint
1920
installPlaywright: false
@@ -23,6 +24,9 @@ jobs:
2324
- name: E2E tests
2425
command: test:e2e
2526
installPlaywright: true
27+
- name: Docs
28+
command: build:docs
29+
installPlaywright: false
2630
steps:
2731
- name: Checkout
2832
uses: actions/checkout@v4

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ node_modules/
66
dist/
77
lib/
88
types/
9+
10+
# Generated files
11+
.docusaurus
12+
.cache-loader
13+
docs/build

docs/docs/about.jsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { Application, extend } from '@pixi/react';
2+
import { Container, Graphics } from 'pixi.js';
3+
import { useCallback } from 'react';
4+
5+
extend({
6+
Container,
7+
Graphics,
8+
});
9+
10+
export default function App() {
11+
const drawCallback = useCallback((graphics) => {
12+
graphics.clear();
13+
graphics.setFillStyle({ color: 'red' });
14+
graphics.rect(0, 0, 100, 100);
15+
graphics.fill();
16+
}, []);
17+
18+
return (
19+
<Application>
20+
<pixiContainer x={100} y={100}>
21+
<pixiGraphics draw={drawCallback} />
22+
</pixiContainer>
23+
</Application>
24+
);
25+
}

0 commit comments

Comments
 (0)