@magnolia/cli-content-helper
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-preview.1 • Public • Published

Content Helper

This repository contains a set of utility functions designed to support the development of the create-app and create-content-type plugins.

Features

  • ensureLightModuleFolderExists: Validates the existence of a specified light module folder, or prompts the user to confirm or update the path.

  • checkFileExistence: Checks if a file already exists at a given path to prevent overwriting. Throws an error if the file is present, enhancing the safety of file operations.

  • handlePrompt: Manages interactive command-line prompts to guide users through selecting existing entities or creating new ones.

  • createEntity: Generates new files based on prototype templates and the provided data.

  • create The main function for creating new apps and content-types.

  • validateName: Validates the naming of entities against a specific pattern to ensure compliance with naming conventions.

Readme

Keywords

none

Package Sidebar

Install

npm i @magnolia/cli-content-helper

Weekly Downloads

46

Version

1.0.0-preview.1

License

SEE LICENSE IN LICENSE.txt

Unpacked Size

22.1 kB

Total Files

15

Last publish

Collaborators

  • magnolia