@dileepadev/dileepadev-npm
v0.1.0
Published
A npm package about Dileepa Bandara.
Downloads
19
Readme
dileepadev-npm
A simple utility npm package that provides information about Dileepa Bandara. Use it as a library to access my profile details programmatically or as a CLI tool to get my contact info, bio, and social links instantly.
Table of Contents
Installation
npm install dileepadev-npmUsage
As a library
import { greet, getAbout, getContact, getSocials } from 'dileepadev-npm';
console.log(greet('Dileepa'));
// → "Hello, Dileepa!"
console.log(getAbout());
// → [ "I'm an Associate AI Engineer...", ... ]
console.log(getContact());
// → "[email protected]"
console.log(getSocials());
// → { "github": "https://github.com/dileepadev", ... }As a CLI
The package provides an executable. Install globally or use npx:
# Get general help and command list
npx dileepadev-npm help # or --help, -h
# Show version
npx dileepadev-npm version # or --version, -v
# Show name
npx dileepadev-npm name # or --name
# Show about section
npx dileepadev-npm about # or --about
# Show contact details
npx dileepadev-npm contact # or --contact
# Show social links
npx dileepadev-npm socials # or --socials
# Get a friendly greeting (pass any name as the argument)
npx dileepadev-npm Alice
# → Hello, Alice!
# Default greeting (no arguments)
npx dileepadev-npm
# → Hello, World!API
greet(name)
Returns a simple greeting string. Defaults to "World".
getName()
Returns the profile name.
getAbout()
Returns an array of strings describing the profile.
getContact()
Returns the contact email address.
getSocials()
Returns an object mapping social platforms to their URLs.
getVersion()
Returns the package version.
Project Structure
dileepadev-npm/
├── bin/ # CLI entry point
│ └── index.ts
├── src/ # Library source code
│ └── main.ts
├── tests/ # Vitest test files
│ └── main.test.ts
├── dist/ # Compiled output (generated by `npm run build`)
├── coverage/ # Test coverage reports (generated by `npm run test:coverage`)
├── package.json
├── tsconfig.json
└── vitest.config.tsDevelopment
# Install dependencies
npm install
# Build the project
npm run build- Source code lives in
src/andbin/. - Tests live in
tests/. - Build output goes to
dist/. - Edit the source, then run
npm run buildto compile. - Publish new versions via
npm version/npm publish.
Requirements
- Node.js >= 18.0.0
- npm >= 9.0.0
Testing
This project uses Vitest as its test framework.
# Run all tests once
npm test
# Run tests in watch mode (re-runs on file changes)
npm run test:watch
# Run tests with coverage report
npm run test:coverageTest files follow the naming convention *.test.ts and are located in the tests/ directory. Coverage reports are generated in the coverage/ directory using the v8 provider.
License
MIT
