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

nuxtapose

v0.0.1-beta.0.1.5

Published

Generate Files For Nuxt Projects

Downloads

13

Readme

npm version

nuxtapose

nuxtapose is in alpha and may be unstable or changing

nuxtapose is a cli designed to do the repetitive work of Nuxt development for you.

# Create a new component file at 'log-details/log-info.vue' and a corresponding spec file
nuxtapose generate component log-details/log-info

# Generate a new page file at 'pages/faq.vue' and a corresponding spec file
nuxtapose generate page faq

# Generate a new vuex store file at `store/users.ts` and a corresponding spec file
nuxtapose generate vuex users

Installation

npm install -g nuxtapose

Configuration

nuxtapose can be configured via a .nuxtaposerc.json in the projects root directory. nuxtapose will also run a configuration wizard if it is run in a project without a .nuxtaposerc.json

Configuration Fields

{
  // Required Configuration
  "component": "class-based | options-api",
  "vuex": "modules | class-based",
  "module": "modules", // More options coming soon (tm)

  // Optional Configuration
  "confirmChanges": "never | overwrite-only | always",
  "reportLevel": "all | completed-only | none",
}
  • component
    • class-based: generate components using the class based pattern
    • options-api: generate components using the options api
  • vuex
    • modules: generate store files using GetterTree, ActionTree, and MutationTree
    • class-based: Currently unsupported
  • module
    • modules: Generate a store as a module using GetterTree, ActionTree, and MutationTree
  • confirmChanges - Default overwrite-only
    • never: never ask for confirmation before taking an action
    • overwrite-only: ask for confirmation if the action will overwrite a file
    • always: ask for confirmation before any action
  • reportLevel - Default all
    • all: include all events in the run report
    • completed-only: only show events for actions that were completed
    • none: do not generate an after run report

Global CLI Options

Logging Levels

  • --debug, -d
    • increases verbosity of logging
  • --quiet, -q
    • supress all logs and after run reports
  • --verbose, -v
    • equal to --debug and "reportLevel": "all"

Generate Command

Generate a new templated file. This is similar to the ng generate command.

Generate Usage

nuxtapose generate|g <template-type> <output-path>

output-path should not include the base output directory of the template. Output Paths with a trailing slash (i.e. dir/my-component/) will create a sub-directory of the same name containing the generated files:

components/
  - dir/
    - my-component/
      - my-component.vue
      - my-component.spec.ts

Generate Templates

nuxtapose currently only supports Typescript projects, Javascript support is coming soon

| template | output dir | file type | notes | |-------------|-----------------|-----------|----------------------------------------------------------------| | c\|component | components/ | vue | | | p\|page | pages/ | vue | | | l\|layout | layouts/ | vue | Adds layout suffix to provided name | | v\|vuex | store/ | TS/JS | | | mod\|module | store/<name>/ | TS/JS | Generates a file each for getters, setters, actions, and state |

Generate CLI Options

  • --confirm, -c
    • equivalent to using "confirmChanges": "all"

Roadmap

Features that I am hoping to implement in the near future:

  • custom templates
  • storybook story templating for components
  • javascript templates
  • middleware templates
  • programmatic API