1.0.0 • Published 6 months ago

dn-next-cli v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

dn-next-cli

A developer CLI tool for project scaffolding and management, inspired by shadcn-ui.

Features

  • Project initialization with TypeScript, Tailwind CSS, Prettier, and ESLint
  • Component installation and management
  • Component updates and diff checking
  • Modern UI components with best practices
  • Beautiful and consistent styling

Installation

npm install -g dn-next-cli

Or using yarn:

yarn global add dn-next-cli

Or using pnpm:

pnpm add -g dn-next-cli

Usage

Initialize a New Project

dn init

This will prompt you for:

  • Project name
  • TypeScript support
  • Tailwind CSS support
  • Prettier configuration
  • ESLint configuration

Add a Component

dn add <component-name>

Available components:

  • button
  • card
  • dialog
  • dropdown
  • input
  • select
  • textarea
  • toggle

If no component name is provided, you'll be prompted to select one from the list.

Check Component Differences

dn diff [component-name]

Shows differences between installed components and their templates. If no component name is provided, checks all installed components.

Update Components

dn update [component-name] [--yes]

Updates components to their latest versions. If no component name is provided, updates all installed components. Use --yes to skip confirmation prompts.

Development

Prerequisites

  • Node.js 16 or later
  • npm, yarn, or pnpm

Setup

  1. Clone the repository:

    git clone https://github.com/gabros20/dn-next-cli.git
    cd dn-next-cli
  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build
  4. Link for local development:

    npm link

Testing

Run tests:

npm test

Run tests in watch mode:

npm run test:watch

Generate coverage report:

npm run test:coverage

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

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