@rgcabral/folder-structure

0.1.23 • Public • Published

Folder Structure

Folder Structure é um projeto criado para simplificar a organização de pastas e a geração de arquivos em projetos Node.js. Ele oferece uma interface de linha de comando (CLI) e funções que automatizam essas tarefas, proporcionando uma estrutura padronizada e eficiente para o desenvolvimento de aplicações.

Folder Structure is a project designed to simplify folder organization and file generation for Node.js projects. It provides a command-line interface (CLI) and functions to automate these tasks, offering a standardized and efficient structure for application development.

Instalação | Installation

Instale o pacote em seu projeto com o seguinte comando:

Install the package in your project directory with the following command:

npm  i  @rgcabral/folder-structure
npm  i  @rgcabral/folder-structure  -g (functions and  imports  are  unavailable)

## ou | or

yarn  add  @rgcabral/folder-structure

Utilização | Utilization

A CLI é utilizada para a criação de formatações iniciais e oferece funções de suporte que automatizam a criação de padrões estruturais no seu projeto. Com apenas alguns comandos, você pode gerar uma estrutura organizada e eficiente para facilitar o desenvolvimento.

The CLI is used to create initial formatting and provides support functions to automate the creation of structural patterns in your project. With just a few commands, you can generate an organized and efficient structure to streamline development.

CLI

comando inicial: | Initial command:

npx folder-structure <dist> -l  typescript

ou (em caso de instalação global) | or (in case of global installation):

folder-structure <dist> -l  typescript

Ajuda: | Help:

Examples:

$  folder-structure  ./  --language  typescript  --structure  node

$  folder-structure  ./  --language  javascript  --structure  react

$  folder-structure  ./  -l  javascript  -s  node

Argument:

-  `<dist>`: The destination directory where the structure will be created.
			 It is recommended to use `./` to generate the structure in the current directory.

  

Available  languages:

-  typescript:  Generates  files  in  TypeScript

-  javascript:  Generates  files  in  JavaScript

- (DEFAULT): typescript

  

Available  structures:

-  node:  Organizes  files  for  a  Node.js  project

-  react:  Organizes  files  for  a  React  project

- (DEFAULT): node

após comando inicial: | after initial command:

npm install

Funções | Functions

indisponível em caso de instalação global unavailable in case of global installation


createRawStructureApiNode(language, name, [rootPath])

Descrição

Cria uma estrutura para um novo módulo na API (rota, controlador, serviço e repositório), apenas a estrutura sem conteúdos.

Description

Creates a structure for a new module in the API (route, controller, service, and repository), structure only without contents.


createStructureCRUDNode(language, name, [rootPath])

Descrição

Cria uma estrutura para um novo módulo na API (rota, controlador, serviço e repositório), estrutura com conteúdos.

Description

Creates a structure for a new module in the API (route, controller, service, and repository), structure with contents.


listFilesAndDirectories([directoryPath], [indent])

Descrição

Lista a estrutura do diretório em formato JSON e em outro formato de texto.

Description

Lists the directory structure in both JSON format and another text format.


updateGeneratedStructure()

Descrição

Atualiza o texto da estrutura de pastas e arquivos gerados.

Description

Updates the text of the generated folder and file structure.

Integração | Integration

NODE

A biblioteca Folder-Structure é compatível com as principais bibliotecas e plugins utilizados na criação de servidores backend com Node.js, facilitando a organização do projeto e a integração com ferramentas populares, como:

The Folder-Structure library is compatible with key libraries and plugins commonly used in the development of backend servers with Node.js. It simplifies project organization and integrates seamlessly with popular tools such as:

REACT

Inicie um projeto Vite com o comando inicial: | Start a Vite project with the initial command:

$ npm create vite@latest

A biblioteca Folder-Structure se integra ao Vite e é compatível com as principais ferramentas utilizadas na criação de projetos frontend com React. Ela auxilia na criação de estruturas de pastas, facilitando a organização do projeto e a integração com ferramentas populares, como:

The Folder-Structure library integrates with Vite and is compatible with key tools used in frontend development with React. It assists in creating folder structures, simplifying project organization, and ensuring seamless integration with popular tools such as:

Recomendação | Recommendation

Os pacotes estão em versões fixas e, possivelmente, desatualizadas. Recomenda-se reinstalar os pacotes nas versões mais recentes, removendo as dependências do package.json e, em seguida, instalando novamente.

The packages are locked to fixed versions and may be outdated. It is recommended to reinstall the packages with newer versions by removing the dependencies from package.json and then reinstalling them.

Aviso | Warning ⚠️

  • Em Desenvolvimento 🚨⚠️

    • Mais funções de suporte
  • In Development 🚨⚠️

    • More support functions

Package Sidebar

Install

npm i @rgcabral/folder-structure

Weekly Downloads

1,297

Version

0.1.23

License

ISC

Unpacked Size

303 kB

Total Files

182

Last publish

Collaborators

  • rgcabral