2.1.0 • Published 5 months ago

create-app-page v2.1.0

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
5 months ago

create-app-page

Description

This command line tool will create a new NextJS app router page in the current directory. In addition, it will optionally create additional files and folders based on the user's input. There are:

  • A Next JS route layout file
  • A components folder1
  • A handlers folder1
  • A hooks folder1
  • A utilities folder1.
  • An API route folder1,4
  • A Drizzle ORM schema file2,3

Notes:

  1. For each of these folders, an empty index.ts will be create in addition to an index.ts folder next to the page.ts file.
  2. The existing index.ts file will be updated to add the new schema.
  3. Zod schema and types will be generated for the new schema.
  4. The existing top-level route handler will be updated to add the new route.

Usage

To create a new page in the current directory, run the following command. The tool will prompt you for the information needed to complete the process that is not provided as command line arguments and options.

npx create-app-page

Environment variables

The tool uses not environment variables.

Command line arguments

This tool uses the following command line arguments:

ArgumentDescription
pageNameThe name of the new page.

Command line options

This tool uses the following command line options:

OptionDescription
-d --defaultsUse default values for all prompts.
-f --forceOverwrite existing files without prompting.
-h --helpDisplay help for command.
-q --quietSuppress all output other than warning and errors.
-y --yesSkip confirmation prompt.
-V --versionDisplay version number.

Error codes

The following codes will be displayed if an error occurs: | Code | Description | |------|-------------| | 0 | Use chose to abort the process. | | 1 | The path provided for the new page already exists. | | 2 | An error occurred creating a file or a folder. |

License

GNU General Public License (GPL)

This software is licensed under the GNU General Public License (GPL). The GPL allows users to freely use, copy, modify, and distribute this software under the following conditions:

  • Any modified versions of this software must also be licensed under the GPL.

  • The original or modified software cannot be sold or used for profit.

  • The source code must be made available when distributing the software.

For more detailed information, please visit the official GNU GPL website.

Contributing

To contribute, contact RamonaSteve.

Change Log

Release 2.1.0

  • Corrected prompting for page name when not provided as command line argument.
  • Updated process exit codes.
  • Updated this document.

Release 2.0.0

  • Major refactor of codebase.
  • Added command line arguments and options.
  • Add help information.
  • Updated this document.

Release 1.0.0

  • Initial release

Know Issues

There are no known issues at this time.

Planned Enhancements

  1. Add option to update AuthItems for the parent route.
  2. Add option to update navigation bar items for the parent route.
2.0.0

5 months ago

0.0.73

5 months ago

0.0.74

5 months ago

0.0.75

5 months ago

0.0.76

5 months ago

0.0.77

5 months ago

0.0.78

5 months ago

0.0.70

5 months ago

0.0.72

5 months ago

0.0.62

5 months ago

0.0.63

5 months ago

0.0.64

5 months ago

0.0.65

5 months ago

0.0.66

5 months ago

0.0.67

5 months ago

0.0.68

5 months ago

0.0.69

5 months ago

0.0.60

5 months ago

0.0.61

5 months ago

0.0.59

5 months ago

0.0.51

5 months ago

0.0.52

5 months ago

0.0.53

5 months ago

0.0.54

5 months ago

0.0.55

5 months ago

0.0.56

5 months ago

0.0.57

5 months ago

0.0.58

5 months ago

0.0.50

5 months ago

0.0.48

5 months ago

0.0.49

5 months ago

1.0.19

5 months ago

1.0.2

5 months ago

0.0.40

5 months ago

1.0.1

5 months ago

0.0.41

5 months ago

1.0.17

5 months ago

1.0.0

5 months ago

0.0.42

5 months ago

1.0.16

5 months ago

0.0.43

5 months ago

0.0.44

5 months ago

0.0.45

5 months ago

0.0.46

5 months ago

0.0.47

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.22

5 months ago

0.0.37

5 months ago

1.0.21

5 months ago

0.0.38

5 months ago

1.0.20

5 months ago

0.0.39

5 months ago

1.0.23

5 months ago

0.0.30

6 months ago

0.0.31

6 months ago

0.0.32

6 months ago

0.0.33

6 months ago

0.0.34

6 months ago

0.0.35

5 months ago

0.0.36

5 months ago

0.0.27

6 months ago

0.0.28

6 months ago

0.0.29

6 months ago

2.1.0

5 months ago

1.0.11

5 months ago

1.0.10

5 months ago

1.0.15

5 months ago

1.0.14

5 months ago

1.0.13

5 months ago

1.0.12

5 months ago

0.0.26

6 months ago

0.0.25

6 months ago

0.0.24

6 months ago

0.0.23

6 months ago

0.0.22

6 months ago

0.0.21

6 months ago

0.0.20

6 months ago

0.0.19

6 months ago

0.0.18

6 months ago

0.0.17

6 months ago

0.0.16

6 months ago

0.0.15

6 months ago

0.0.14

6 months ago

0.0.13

6 months ago

0.0.12

6 months ago

0.0.11

6 months ago

0.0.10

6 months ago

0.0.9

6 months ago

0.0.8

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.5

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago