1.0.8 • Published 9 months ago

@jswork/plop-utils v1.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

plop-utils

Plop notes.

version license size download

installation

npm install @jswork/plop-utils
yarn add dayjs

usage

import { load, metadata } from '@jswork/plop-utils';

// plopfile.js
export default async function (plop) {
  await load(plop);
}

// a generator file
export default function (
  /** @type {import('plop').NodePlopAPI} */
  plop
) {
  plop.setGenerator('component', {
    description: 'Create a component',
    prompts: [
      {
        type: 'input',
        name: 'name',
        message: "What is this component's name?"
      }
    ],
    actions: [
      {
        type: 'addMany',
        destination: 'src/components/{{ name }}/',
        templateFiles: '.templates/component/*.hbs',
        data: metadata
      }
    ]
  });
}

license

Code released under the MIT license.

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago