great-dev
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

great-dev 🚀

A powerful CLI tool for JavaScript and TypeScript development with hot reloading. 🔥

Features 🌟

  • 🔄 Hot reloading for JavaScript and TypeScript files
  • 🧰 Intelligent runtime detection and multi-runtime support
  • 🔍 Configurable file watching with debounce
  • 🚦 TypeScript compilation (file-based or in-memory)
  • 🧵 Worker thread support for improved performance
  • 🧠 Memory optimization
  • 📊 Detailed logging with multiple levels
  • 😄 Optional meme mode for fun output

Installation 📥

npm install -g great-dev

Basic Usage 🚀

great-dev -p ./src

This will start watching the ./src directory for changes and automatically reload your application.

Configuration ⚙️

You can configure great-dev using command-line options or a configuration file.

Command-line Options 🖥️

  • -p, --path <paths...>: Paths to watch for changes
  • -i, --ignore <patterns...>: Patterns to ignore
  • -w, --watch-delay <ms>: Debounce delay for file watching (ms)
  • -t, --ts-config <path>: Path to tsconfig.json
  • -l, --log-level <level>: Log level (info, debug, verbose)
  • -m, --meme-mode: Enable meme mode for fun output
  • --worker-threads <number>: Number of worker threads to use

Example:

great-dev -p ./src -i node_modules -w 500 -l debug --worker-threads 4

Configuration File 📄

Create a .greatdevrc.json file in your project root:

{
  "paths": ["./src"],
  "ignore": ["node_modules/**", "**/*.test.ts"],
  "watchDelay": 300,
  "tsConfigPath": "tsconfig.json",
  "logLevel": "info",
  "memeMode": false,
  "workerThreads": 2
}

Advanced Features 🧠

Logging Levels 📊

great-dev supports multiple logging levels:

  • info: Basic information (default)
  • debug: More detailed information for troubleshooting
  • verbose: Highly detailed logs for in-depth analysis

Set the log level using the -l, --log-level option or in the configuration file.

Worker Threads 🧵

Improve performance by utilizing worker threads. Specify the number of worker threads using the --worker-threads option or in the configuration file.

Memory Optimization 💾

great-dev automatically optimizes memory usage by periodically running garbage collection and adjusting the heap size limit.

Meme Mode 😄

Enable meme mode for fun ASCII art output using the -m, --meme-mode option or in the configuration file.

Troubleshooting 🔧

  • If you encounter any issues, check the console output for error messages.
  • Ensure that your project's dependencies are installed.
  • Verify that the specified paths and ignore patterns are correct.
  • Check if your tsconfig.json is correctly configured, especially the outDir setting.

Contributing 🤝

Contributions are welcome! Please feel free to submit a Pull Request.

License 📄

This project is licensed under the MIT License.

Package Sidebar

Install

npm i great-dev

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

20 kB

Total Files

8

Last publish

Collaborators

  • hacxk