Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Duck GeneratorNew to Visual Studio Code? Get it now.
Duck Generator

Duck Generator

Van H

|
266 installs
| (0) | Free
Generates duck folder and files for the re-ducks pattern.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Duck Generator

Utility to generate ducks for managing state in Redux using the re-ducks pattern.

A duck contains the following files:

  • actions.js
  • index.js
  • operations.js
  • reducers.js
  • selectors.js
  • tests.js
  • types.js
  • utils.js // will not be generated

NOTE 1: Assumes that duck will be generated in ./src/state/ducks if a name is given. Example: quack, when entered into the prompt, will create the duck at ./src/state/ducs/quack.

NOTE 2: When specifying a path for the duck, the parent ducks folder must exist. Example: src/state/ducklings/quack, the folder ducklings must exist.

Usage

Open the command palette (macOS: Shift+Command+P, Windows: Ctrl+Shift+P) and type, "Generate Duck."

Command Palette

Type the name of the duck and hit enter.

Some Duck

Alternatively you can specify a relative path to a ducks folder that already exists.

Some Duck Path

Known Issues

  • Folder: src/state/ducks should exist or you will get an error.
  • Not tested on Windows.

Source

GitHub

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft