How steveruizok/perfect-freehand works
Project type and purpose
• This is a monorepo managed by Lerna that contains two packages:
• packages/perfect-freehand: the core library for generating pressure-sensitive stroke outlines (a small open-source tool/library).
• packages/dev: a React-based demo and development harness that consumes the library, shows usage (demo front end).
• The README describes the library’s API (getStroke, getStrokePoints, getOutlinePoints), usage examples, options, tests, and development workflow.
File structure
• Top-level: configuration files (.eslintrc.js, tsconfig*, build.mjs, lerna.json, GitHub workflows, Husky hooks).
• packages/perfect-freehand:
• src/: core algorithms (getStroke, outline computation), type definitions, test suite under src/test.
• scripts/: build/dev scripts (Node.js build pipeline).
• tsconfig, package.json – library metadata.
• packages/dev:
• esbuild.config.mjs – bundling config for fast dev server.
• tsconfig, package.json – demo metadata.
• tutorial/: markdown instructions.
• Root: CI pipeline (GitHub Actions), linting, pre-commit, test runner (setupTests.ts), monorepo management (Lerna).
README for additional insights
• The README focuses on the library’s functions, options, rendering examples, and encourages contributions.