JSPM

  • Created
  • Published
  • Downloads 75
  • Score
    100M100P100Q51420F
  • License GPL-3.0

Create a new Next JS 15 app router app page and optionally supporting folders and files.

Package Exports

  • create-app-page
  • create-app-page/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (create-app-page) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

npx create-app-page

Environment variables

The tool uses not environment variables.

Command line arguments

This tool uses not command line arguments.

Error codes

The following codes will be displayed if an error occurs:

Code Description
1
The path provided for the new page already exists.

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 1.0.0

  • Initial release

Know Issues

There are no known issues at this time.

Planned Enhancements

  1. Implement command line interface for user inputs and options.
  2. Add option to update AuthItems for the parent route.
  3. Add option to update navigation bar items for the parent route.