1.0.2 • Published 2 years ago

@anovius/auto-gen v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

AUTO-GEN

░█▀█░█░█░▀█▀░█▀█░░░░░█▀▀░█▀▀░█▀█ ░█▀█░█░█░░█░░█░█░▄▄▄░█░█░█▀▀░█░█ ░▀░▀░▀▀▀░░▀░░▀▀▀░░░░░▀▀▀░▀▀▀░▀░▀

A CLI tool that take JSON file as input and create a react js project with complete routing.

Features

  • Fully customized layouts (header, footer)
  • Auto folder structure ready to go
  • Proper naming convention of files
  • Proper import exports
  • Nested Routes and Components support

Installation & Usage

Install this package using npm

  npm install -g @anovius/auto-gen

This will create porject in current directory

  autogen you_json_file.json

JSON file template

{
    "project": "Sample",
    "layout": {
        "header": false,
        "pages": [
            {
                "name": "Home",
                "header": true,
                "sub": [],
                "footer": false
            },
            {
                "name": "Auth",
                "header": true,
                "sub": [
                    {
                        "name": "Login"
                    },
                    {
                        "name": "Register",
                        "sub": [
                            {
                                "name": "Admin"
                            },
                            {
                                "name": "User"
                            }
                        ]
                    }
                ],
                "footer": false
            },
            {
                "name": "Dashboard",
                "header": true,
                "sub": [
                    {
                        "name": "Main"
                    },
                    {
                        "name": "Profile"
                    },
                    {
                        "name": "Settings"
                    }
                ],
                "footer": false
            }
        ],
        "footer": true
    },

    "type": "js"
}

Template Properties

NameTypeUsage
projectstringName of your project
typestringYour project type JS for Javascript and TS for Typescript
layoutobjectMain header and footer of your project
headerboolDefault false
footerboolDefault false
namestringYour page name
pagesarrayMain pages of the project
subarrayNested Pages of a page

Authors