npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@meta-ultra/app-router-cli

v1.0.1

Published

A program for generating router configuration abiding by Next.js App Router.

Downloads

15

Readme

Welcome to @meta-ultra/app-router-cli

With @meta-ultra/app-router and @meta-ultra/app-router-auth, we can structure our project in Next.js App Router convention by setting up the router configuration manually. Are you looking for a more effective way to automate the configure processing. There we are! @meta-ultra/app-router-cli is exactly what you want.

Give a ⭐️ if this project helped you!

🌟 Features

  • Supports page, layout, not-found, error, global-error and template.
  • Supports group routes, including extended group route segment (...name).
  • Supports dynamic routes including catch-all and optional catch-all segments.
  • Supports parallel routes.
  • Supports intercepting routes.
  • Supports route handlers.
  • Generates root layout automatically if no root layout is found.
  • Allows to prefer browser router or hash router.
  • Be able to customize basename of the router.
  • Supports watch mode, easy to integrate to your building workflow.

:alien: Prerequisites

Due to the output of processing which is code snippet will depend on @meta-ultra/app-router, please run pnpm add @meta-ultra/app-router@latest to install it first.

🏠 Installation

Install @meta-ultra/app-router with your favorite package manager:

  • pnpm: pnpm add -D @meta-ultra/app-router-cli@latest
  • yarn: yarn add -D @meta-ultra/app-router-cli@latest
  • npm: npm install -D @meta-ultra/app-router-cli@latest

✨ Usage

  • Show the help text

    > app-router -h
    
    Usage:
    $ app-router <command> [options]
    
    Options:
      -h, --help                           Display this message
      -v, --version                        Display version number
      --hash                               Use hash instead of history API (default: false)
      --basename, -b [basename]            The URL basename(synonym for publicPath in Webpack) defaults to process.env.PUBLIC_URL (default: process.env.PUBLIC_URL)
      --watch, -w                          Enable watch mode (default: false)
      --watch-aggregate-timeout [timeout]  Add a delay(ms) before rebuilding once the first file added or removed (default: 700)
      --base-url [baseUrl]                 The baseUrl for route handlers, defaults to process.env.REACT_APP_BASE_URL (default: process.env.REACT_APP_BASE_URL)
      --mock-adapter [mockAdapter]         The import statement path of mock adapter, defaults to "./utils/mockAdapter" (default: ./utils/mockAdapter)
      --source, -s [folder]                The app folder path (default: ./src/app)
      --output, -o [file]                  The router file path (default: ./src/router.tsx)
  • Run in watch mode

    app-router -w -s ./src/app -o ./src/router.tsx

👶 Author

Hey, friends. I'm John Huang, a full stack developer majorly code with React, Next.js, GraphQL, TailwindCSS, Taro and SpringBoot. Feel free to contact with me 😃

🤝 Contributing

Contributions, issues and feature requests are welcome! Feel free to check issues page.