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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v6

- uses: actions/setup-node@v5
with:
Expand Down
35 changes: 12 additions & 23 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@ on:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
group: deploy-docs
cancel-in-progress: true

jobs:
build:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v6

- uses: actions/setup-node@v5
with:
Expand All @@ -33,22 +31,13 @@ jobs:

- name: Build docs
run: pnpm nx build docs
env:
DOCS_BASE: /angular-gsap/

- name: SPA fallback
run: cp dist/apps/docs/analog/public/index.html dist/apps/docs/analog/public/404.html

- uses: actions/upload-pages-artifact@v4
with:
path: dist/apps/docs/analog/public

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
- name: Deploy to Netlify
run: >
pnpm dlx netlify-cli deploy
--prod
--dir dist/apps/docs/analog/public
--message "${{ github.event_name }}: ${{ github.sha }}"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ signals; change one and the entrance replays. When the OS asks for reduced
motion they don't animate at all. They are deliberately **not** general-purpose
tween wrappers: anything beyond a preset entrance belongs in `injectGsap`.

There are ten more preset directives (`splitReveal`, `scrambleText`, `drawSvg`,
`counter`, `parallax`, `drag`, `scrollTo`, `observe`, `hover`, `sequence`),
each covered with a running demo in the docs.

### Patterns

**State-driven choreography.** A `viewChildren` query is a signal: when state adds or removes elements, the query updates and the animation replays, with the DOM already rendered:
Expand Down Expand Up @@ -212,7 +216,7 @@ pnpm nx serve docs

## Small and fast

- The package is about 6 kB (FESM + types) with no dependencies beyond Angular, GSAP, and tslib. No rxjs, no zone.js.
- The package is about 6 kB minified and gzipped, with no dependencies beyond Angular, GSAP, and tslib. No rxjs, no zone.js.
- `sideEffects: false`: exports you don't use (the directives, the helpers) tree-shake away, and GSAP plugins are bundled only when you import them. `provideGsap` also works in lazy route `providers`, which keeps a plugin's code in that route's chunk instead of the main bundle.
- Animations are created outside Angular's change detection and run on GSAP's ticker. A 60 fps tween schedules no Angular work, and the whole library is zoneless-ready.

Expand Down
1 change: 1 addition & 0 deletions apps/docs/public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* /index.html 200
4 changes: 2 additions & 2 deletions apps/docs/src/app/pages/(home).page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const COPY = {
},
{
title: 'Tree-shakeable',
body: 'Use two directives and the other nine leave your bundle. Plugins cost bytes only when you import them.',
body: 'Use two directives and the other ten leave your bundle. Plugins cost bytes only when you import them.',
},
{
title: 'Zero change detection cost',
Expand Down Expand Up @@ -105,7 +105,7 @@ const COPY = {
},
{
title: 'Tree-shakeable',
body: 'Usa dos directivas y las otras nueve salen del bundle. Los plugins cuestan bytes solo cuando los importas.',
body: 'Usa dos directivas y las otras diez salen del bundle. Los plugins cuestan bytes solo cuando los importas.',
},
{
title: 'Cero costo en change detection',
Expand Down
7 changes: 7 additions & 0 deletions apps/docs/src/app/pages/reference.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ export const routeMeta: RouteMeta = {
tween.
</td>
</tr>
<tr>
<td><code>effects</code></td>
<td>
Registered with <code>gsap.registerEffect()</code>, usable as
<code>gsap.effects.name()</code> in any callback.
</td>
</tr>
</tbody>
</table>
</section>
Expand Down