A tool to create files following the atomic design pattern
Table of Contents
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.
- Install the toll using npm
npm install -g git+https://github.com/jrnmagalhaes/atomicfiles.git
- 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"
}
cafe --help
cafe -t
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
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
- A huge thanks to Victor for giving me ideas for the name
- I'm not a NodeJS developer, if any part of this code hurts your feelings I'M SORRY
- Cafe means coffee in portuguese.