nuxt-module-cli-shortcuts
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

⌨️ Nuxt Module CLI Shortcuts

npm version npm downloads License Nuxt

demo

Features

  • 🚠 Rich built-in shortcuts.
  • 🔧 Support Stdin raw mode.
  • 🕹️ Support Custom shortcuts.

Quick Setup

  1. Add nuxt-module-cli-shortcuts dependency to your project
npx nuxi module add nuxt-module-cli-shortcuts
  1. Add nuxt-module-cli-shortcuts to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    'nuxt-module-cli-shortcuts',
  ],
  shortcuts: {
    rawMode: true,
    customShortcuts: []
  }
})

Configuration

RawMode

Whether to enable stdin raw mode. It may cause some problems.

When disable it , every shortcuts needs to be followed with an Enter press to execute it.

CustomShortcuts

customShortcuts: [
  {
    key: 't',
    description: 'test custom shortcuts',
    action({ nuxt }) {
      console.log('Nuxt Instance', nuxt)
    }
  }
]

You can refer built-in shortcuts to learn more.

Contribution

Local development
# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release

❤️ Credits

Inspired by

Vite Shortcuts

Readme

Keywords

none

Package Sidebar

Install

npm i nuxt-module-cli-shortcuts

Weekly Downloads

5

Version

0.0.4

License

MIT

Unpacked Size

9.37 kB

Total Files

9

Last publish

Collaborators

  • yuyinws