Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 878 Bytes

File metadata and controls

61 lines (41 loc) · 878 Bytes

📦 CLI Toolbox - Project Generator

Installation

$ pnpm add -D plop @cli-toolbox/project

# or

$ npm install -D plop @cli-toolbox/project

Usage

After installing the packages, you have to create a plopfile.{js,mjs} in the root of your project.

# CommonJS
$ touch plopfile.js

# or

# ECMAScript modules
$ touch plopfile.mjs

Then, you can add the following code to your plopfile.{js,mjs}:

// plopfile.js

/** @param {import('plop').NodePlopAPI} plop */
async function config(plop) {
  await plop.load('@cli-toolbox/project')
}

module.exports = config

OR

// plopfile.mjs

/** @param {import('plop').NodePlopAPI} plop */
export default async function config(plop) {
  await plop.load('@cli-toolbox/project')
}

After that, you can run the following command:

# pnpm
$ pnpm plop

# or

# npm
$ npx plop