Skip to content

A tool to create files following the atomic design pattern

Notifications You must be signed in to change notification settings

jrnmagalhaes/cafe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create Atomic Files Elegantly

A tool to create files following the atomic design pattern

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Thank you notes
  7. Disclaimers

About The Project

The objective of this tool is to automate the process of creating atomic files (atoms, molecules, organisms or whatever you want).

It creates the file itself, the folders to keep everything organized and updates all index.js files needed to get it ready to use.

Getting Started

Installation

  1. Install the toll using npm
npm install -g git+https://github.com/jrnmagalhaes/atomicfiles.git
  1. Create a cafe.config.json file in the folder you are planning to use this tool.
{
  "projectType": "react-native", //react-native or react
  "src_folder": "folderName"
}

Usage

To ask for help

cafe --help

To list all atomic types

cafe -t

To create atomic files

Specify an attribute called --at, using an atomic type as a value, then input a name

cafe --at=a atomName

The command above will create an atom (--at=a) called atomName

You can even specify the folder name. The following command will create a folder called custom inside atom's folder with AtomName.js inside:

cafe --at=a custom/atomName

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Thank you notes

  1. A huge thanks to Victor for giving me ideas for the name

Disclaimers

  1. I'm not a NodeJS developer, if any part of this code hurts your feelings I'M SORRY
  2. Cafe means coffee in portuguese.