npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

type-craft-wizard

v1.0.1

Published

Type-Craft-Wizard is a TypeScript package that simplifies and automates type generation based on contextual data and samples.

Downloads

449

Readme

Type-Craft-Wizard

Type-Craft-Wizard is a powerful TypeScript tool designed to automate and streamline type generation based on contextual data samples. It simplifies the process of type management by creating a structured type system tailored to your project's needs.

Features

  • Automatic Type Generation: Generate TypeScript types based on sample data and context.
  • Structured Directory Setup: Automatically creates a types directory with Types.ts and SampleData.ts, and a utils directory with utils.ts.
  • Easy Integration: Includes an index.ts entry point and necessary configurations for seamless integration into your project.

Installation

You can install Type-Craft-Wizard globally or locally in your project using npm or yarn.

Global Installation

npm install -g type-craft-wizard

or

yarn global add type-craft-wizard

Local Installation

npm install type-craft-wizard --save-dev

or

yarn add type-craft-wizard --dev

Usage

Once installed, you can use the command line interface to generate the necessary files and directories for type management.

Command Line Interface

Run the following command to generate the types directory and other necessary files:

npx generate <type-name>

Command Categories and Options

1. Data Management Types

Generate types and sample data for various data management needs:

  • dataset-data: Types and data for datasets.
  • evaluation-metrics: Types and data for evaluation metrics.
  • interactive-exercises: Types and data for interactive exercises.
  • learning-progress: Types and data for tracking learning progress.

2. Financial Management

Generate types and sample data for financial management:

  • investment-portfolios: Types and data for investment portfolios.
  • market-trends: Types and data for market trends.
  • financial-reports: Types and data for financial reports.

3. Customer and Supply Chain Management

Generate types and sample data for customer and supply chain management:

  • crm: Types and data for customer relationship management, including customer details and interaction history.
  • supply-chain-management: Types and data for managing supply chain aspects like inventory levels and order status.

4. Developer and User Profiles

Generate types and sample data for profiles:

  • developer-profile: Types and data for developer profiles.
  • user: Types and data for user profiles.

5. Health and Nutrition

Generate types and sample data for health and nutrition:

  • meal-plans: Types and data for meal plans and dietary restrictions.
  • mental-health: Types and data for mental health, including therapy session notes and mood tracking.
  • medical-records: Types and data for medical records.
  • treatment-plans: Types and data for treatment plans.

6. Media and Entertainment

Generate types and sample data for media and entertainment:

  • playlist-data: Types and data for music playlists and streaming metrics.
  • episode-metadata: Types and data for TV episode metadata and cast data.
  • music-streaming: Types and data for music streaming metrics.

7. Environment and Agriculture

Generate types and sample data for environmental and agricultural management:

  • air-quality: Types and data for air quality monitoring.
  • water-quality: Types and data for water quality monitoring.
  • weather-data: Types and data for weather data.
  • soil-data: Types and data for soil data.
  • farm-activities: Types and data for farm activities and management.
  • crop-data: Types and data for crop management.

8. Technology

Generate types and sample data for various technology-related information:

  • model-data: Types and data for AI model data.
  • deployment-info: Types and data for deployment configurations.

9. Media

Generate types and sample data for media:

  • audio: Types and data for audio content, including metadata and formats.
  • video: Types and data for video content, including metadata and formats.
  • image-metadata: Types and data for image metadata.
  • image-tags: Types and data for image tags.
  • image-usage: Types and data for image usage statistics.

10. Event and Education

Generate types and sample data for events and educational purposes:

  • event: Types and data for event management, including event details and scheduling.
  • education-game: Types and data for educational games and their mechanics.

Help Commands

  • To list all available commands and their explanations:

    npx generate --help all
  • To get help on a specific command:

    npx generate <type-name> --help

Directory and File Overview

After running the generate command, the directory structure will be:

/project-root
  ├── types
  │   ├── Types.ts
  │   └── SampleData.ts
  ├── utils
  │   └── utils.ts
  ├── lib
  ├── .gitignore
  ├── index.ts
  └── package.json
  • types/Types.ts: Contains the generated TypeScript types based on your context and sample data.
  • types/SampleData.ts: Holds sample data used for type generation.
  • utils/utils.ts: Includes utility functions for type manipulation and management.
  • lib/: Reserved for any additional library files or compiled output.
  • .gitignore: Ensures that generated files and directories are ignored by version control.
  • index.ts: Entry point for your project or package.
  • package.json: Manages your project's dependencies and scripts.

Contributing

Contributions to Type-Craft-Wizard are welcome! If you have ideas for improvements or find any issues, please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or support, please reach out to [email protected].