moar-interactive-shared
v1.0.0
Published
Shared React components and utilities library.
Readme
Moar Interactive Shared
Shared React components and utilities library.
Requirements
- Node.js >= 24 LTS
- React >= 19
- React DOM >= 19
Development
Install Dependencies
npm installBuild the Library
Build the library for production:
npm run buildBuild the library in watch mode for development:
npm run devRun Tests
Run tests in watch mode:
npm testLint Code
npm run lintLint Fix Code
npm run lint:fixFormat Code
npm run formatUsage in Other Projects
Local Development
To use this package locally in another project, link it using a file reference in your package.json:
{
"dependencies": {
"moar-interactive-shared": "file:../moar-interactive-shared"
}
}Otherwise, you can publish the package to the npm registry and use it as a normal dependency:
{
"dependencies": {
"moar-interactive-shared": "^1.0.0"
}
}Import Components
import { YourComponent } from 'moar-interactive-shared';Project Structure
moar-interactive-shared/
├── src/
│ └── lib/ # Library source code
│ └── index.js # Main entry point
├── dist/ # Built library (generated)
├── package.json
├── vite.config.js
└── README.mdBuilding
The library is built using Vite and outputs ESM modules to the dist/ directory. The build process:
- Bundles all source files from
src/lib/ - Externalizes React and React DOM as peer dependencies
- Copies any static assets
Notes
- React and React DOM are peer dependencies and must be installed in the consuming project
- The library uses ESM (ES Modules) format
- Styles should be imported separately in consuming projects if needed
Publishing
This library is public at https://www.npmjs.com/package/moar-interactive-shared To publish a new version, run:
npm login `(provide necessary credentials)`
npm publish