Skip to content

Commit

Permalink
Merge pull request #575 from pixijs/feat/docs
Browse files Browse the repository at this point in the history
feat: doc updates
  • Loading branch information
trezy authored Feb 7, 2025
2 parents 62993db + 87740b5 commit 27405d6
Show file tree
Hide file tree
Showing 115 changed files with 33,233 additions and 11,721 deletions.
4 changes: 0 additions & 4 deletions .codesandbox/ci.json

This file was deleted.

1 change: 0 additions & 1 deletion .codesandbox/sandbox/index.jsx

This file was deleted.

18 changes: 0 additions & 18 deletions .codesandbox/sandbox/package.json

This file was deleted.

1 change: 0 additions & 1 deletion .codesandbox/sandbox/src/index.tsx

This file was deleted.

File renamed without changes.
33 changes: 33 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy Docs

on:
push:
branches:
- main
- docs

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- run: npm ci
- run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git remote set-url origin https://git:${GIT_PASS}@github.com/pixijs/pixi-react.git
npm run deploy
env:
GIT_USER: $GITHUB_ACTOR
GIT_PASS: ${{ secrets.GITHUB_TOKEN }}
8 changes: 6 additions & 2 deletions .github/workflows/handle-release-branch-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ jobs:
strategy:
matrix:
script:
# - name: Typecheck
# command: test:types
- name: Typecheck
command: test:types
installPlaywright: false
- name: Lint
command: test:lint
installPlaywright: false
Expand All @@ -23,6 +24,9 @@ jobs:
- name: E2E tests
command: test:e2e
installPlaywright: true
- name: Docs
command: build:docs
installPlaywright: false
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ node_modules/
dist/
lib/
types/

# Generated files
.docusaurus
.cache-loader
docs/build
25 changes: 25 additions & 0 deletions docs/docs/about.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Application, extend } from '@pixi/react';
import { Container, Graphics } from 'pixi.js';
import { useCallback } from 'react';

extend({
Container,
Graphics,
});

export default function App() {
const drawCallback = useCallback((graphics) => {
graphics.clear();
graphics.setFillStyle({ color: 'red' });
graphics.rect(0, 0, 100, 100);
graphics.fill();
}, []);

return (
<Application>
<pixiContainer x={100} y={100}>
<pixiGraphics draw={drawCallback} />
</pixiContainer>
</Application>
);
}
Loading

0 comments on commit 27405d6

Please sign in to comment.