🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

nuxt-areas

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-areas

Scalable folder management for large Nuxt projects

latest
Source
npmnpm
Version
0.9.2
Version published
Maintainers
1
Created
Source

Nuxt Areas

Scalable folder management for large Nuxt projects

Nuxt Areas

Overview

Areas is a Nuxt module that enables you to group related files by "area":

+- src
    +- areas
        +- products                     <- area 1
        |   +- components
        |   |   +- product-list.vue
        |   +- pages
        |   |   +- index.vue
        |   +- store.js
        +- users                        <- area 2
            +- classes
            |   +- User.js
            +- components
            |   +- user-list.vue
            +- pages
            |   +- index.vue
            +- store
                +- users.js
                +- user.js

Co-locating files this way has various advantages:

  • it's easier to work on a discrete unit of functionality, such as "products" or "users"
  • it's easier to understand what the site does as a whole
  • it's easier to see how related files work together
  • it's less hopping about between multiple branches of the folder tree
  • it's easier to find a home for components, classes, or data
  • naming is easier and imports are shorter

Nuxt's more "global" concerns such as plugins, modules, static , etc remain in the root, making the overall "shape" of the site more intuitive.

Like Nuxt, Areas builds routes from pages, and registers stores and components.

You can even add areas from external sources, providing a no-code way to share or modularise parts of your application.

Next steps

Full documentation is available at:

To see what a working Nuxt Areas site look like, check out the demo:

Keywords

nuxt

FAQs

Package last updated on 17 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts