juliangarnier / anime
Get started
Taken from the repository's own files on 21 Oct 2026. RepoPilot has not run these commands.
Prerequisites
npm (root lockfile; version not captured)from package-lock.json
Commands
package.json| Task | Run | What it runs |
|---|---|---|
| dev | npm run dev | nodemon --quiet --watch src --ext js --exec "rollup -c && tsc -p tsconfig.types.json && echo '\n\033[32m✓ modules and types compiled\n\033[36m⊙ watching for changes...\n\033[0m'" |
| build | npm run build | rm -rf dist && build=true rollup -c && tsc -p tsconfig.types.json && echo '\n\033[32m✓ build completed\n\033[0m' |
| typecheck | npm run typecheck | tsc -p . && tsc -p tests && tsc -p examples |
Install and use
README.mdAnime.js V4 works by importing ES modules like so:
import {
animate,
stagger,
} from 'animejs';
animate('.square', {
x: 320,
rotate: { from: -180 },
duration: 1250,
delay: stagger(65, { from: 'center' }),
ease: 'inOutQuint',
loop: true,
alternate: true
});
Developing
CONTRIBUTING.mdAnime.js is written in JavaScript and the type definitions are generated from JSDoc annotations.
JSDoc types used globally in the project are defined in the src/types.js file. Otherwise, JSDoc types should be defined directly in their corresponding file.
Before opening a PR, follow these steps to properly build and test the project:
- Make sure your PR has a bug report or new feature proposal issue associated with it. If not, create one.
- Clone your fork to your computer.
- Install the NPM dependencies with
npm i. - Modify or add
.jsfiles in/src, with valid JSDoc annotations. - Run
npm run dev-typesto build theanime.esm.jsandindex.d.tsfiles by watching changes in/src. - Add the necessary tests to the relevant file in
/test/suites/. - Run
npm run test-browserto make sure you haven't broken anything and all tests are passing. - Create a pull request on the
devbranch.