Printer Logo

Printer

Please note the project has upgraded to Next App Directories in v2.x.x

4. Printer Config

The Printer Config File is fairly easy and straight forward. By default components folders are turned off. However, you can turn them on. The style component configuration creates a styled-component template. And the test file contains default imports.

The following demonstrates what is generated when creating a component folder. Note that this structure may be useful if you are looking to design your own helpers or other util files for a specific component. Or simply just prefer the folder based component structure.

λ If componentFolder is true and all component files are true
λ printer new component components/login/form
λ This command then creates
λ components/login/form/index.tsx
λ components/login/form/form.component.tsx
λ components/login/form/form.style.tsx
λ components/login/form/form.test.tsx

The following demonstrates what is generated when using the CRUD command. Keep in mind that this CRUD is meant to be a starting point for your API routes. You should also be attaching auth and security.

λ If all crud booleans are true
λ printer crud user
λ This command then creates
λ pages/api/user/create.tsx
λ pages/api/user/update.tsx
λ pages/api/user/get.tsx
λ pages/api/user/list.tsx
λ pages/api/user/delete.tsx