Cubic Configuration
Relevant source files
The following files were used as context for generating this wiki page:
Cubic Configuration defines the development environment, review standards, and build architecture for the @pcstyle/motion software development kit. It establishes strict type-safety rules and automated workflow instructions to ensure high-quality contributions and consistent package exports.
The configuration spans project-level settings in cubic.yaml, module resolution and compilation rules in tsconfig.json, and package distribution definitions in package.json. These files work together to enforce a specific SDK focus: strict type safety, clean API exports, and versioning discipline.
Sources: cubic.yaml:14-15, package.json:1-5
Core Repository Management
The cubic.yaml file serves as the primary configuration for the Cubic automation engine. It enables high-sensitivity code reviews and automated pull request descriptions specifically tailored for an SDK environment.
Review and Governance Rules
The repository enforces "STRICT_TYPES" and "ESM_STANDARDS" through custom rule definitions. This prevents the usage of the any type and ensures the library remains compatible with both ECMAScript Modules (ESM) and CommonJS (CJS) consumers.
| Rule Name | Description |
|---|---|
STRICT_TYPES | Prohibits any types or non-null assertions; requires explicit return types. |
ESM_STANDARDS | Verifies package exports and module definitions for ESM/CJS compatibility. |
Sources: cubic.yaml:5-30
Automated Workflow Configuration
The configuration enables automated PR description generation that highlights API changes and breaking updates. It also includes instructions for resolving threads automatically when addressed and enabling architecture diagrams.
The diagram shows how the Cubic engine processes commits through configured review sensitivities and rule checks.
Sources: cubic.yaml:6-35
Build and Distribution Architecture
The project is structured as a TypeScript-based React library, leveraging Framer Motion for animation capabilities. The build system is designed to output a distribution package that supports multiple entry points.
Compiler Specifications
The tsconfig.json specifies a target of ES2020 with ESNext modules. It enforces strict type checking and generates declaration maps to support developer experience in consuming applications.
| Option | Value | Purpose |
|---|---|---|
target | ES2020 | Modern JavaScript runtime target. |
declaration | true | Generates .d.ts files for type safety. |
jsx | react-jsx | Enables React component support. |
Sources: tsconfig.json:3-15
Package Exports and Entry Points
package.json defines a granular export map, allowing users to import specific modules like variants, transitions, or hooks without importing the entire library.
The diagram illustrates the modular export structure defined in the package configuration.
Sources: package.json:11-37, src/index.ts:1-20
Implementation Constraints
The configuration imposes strict technical constraints to maintain the integrity of the @pcstyle/motion package. These include dependency management and file exclusion patterns.
- Peer Dependencies: Requires
framer-motionversion 10 or higher andreactversion 18 or higher. - Ignored Patterns: The review engine ignores
node_modules,dist, and lock files to focus on source code changes. - Build Scripts: Standardized scripts for
build(tsc),dev(watch mode), andtypecheck.
Sources: package.json:39-48, cubic.yaml:17-21
Conclusion
Cubic Configuration provides a robust framework for maintaining the @pcstyle/motion SDK. By combining strict TypeScript enforcement with automated review rules and modular package exports, it ensures that the project remains scalable, type-safe, and compatible with modern web development standards.