@rondwell/shared-lib
v1.0.3
Published
A shared library for Rondwell Project
Maintainers
Readme
@rondwell/shared-lib
A shared library for the Rondwell Project applications.
Overview
This shared library contains common utilities, interfaces, and functionality used across the Rondwell ecosystem. It provides standardized implementations to ensure consistency and reduce code duplication.
Installation
npm install @rondwell/shared-libUsage
// Import specific functions/classes
import { SomeUtility } from '@rondwell/shared-lib';
// Or import from specific modules
import { ValidationHelpers } from '@rondwell/shared-lib/validation';Project Structure
shared-lib/
├── dist/ # Compiled output
├── src/ # Source code
│ ├── errors/ # Custom error classes
│ ├── middleware/ # Middleware functions
│ ├── types/ # TypeScript types and interfaces
│ ├── utils/ # Utility functions
│ └── index.ts # Main entry point
├── package.json
└── tsconfig.jsonDevelopment
Prerequisites
- Node.js (v20.18+)
- npm
Setup
- Clone the repository
- Install dependencies:
npm install - Build the project:
npm run build
Scripts
npm run build- Build the library
TypeScript Configuration
To properly use this library with TypeScript, ensure your tsconfig.json includes:
{
"compilerOptions": {
"declaration": true,
"esModuleInterop": true,
"moduleResolution": "node"
}
}Troubleshooting
TypeScript Declaration Files
If you encounter TypeScript errors about missing declaration files:
- Make sure you're using the latest version of the library
- Check that the package is correctly installed
Contributing
- Create a branch from
main - Make your changes
- Submit a pull request
License
[LICENSE TYPE] - See LICENSE file for details.