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

@bva/bva-cli

v1.0.0

Published

CLI for internal and external BVA tools

Downloads

52

Readme

bva-cli

A simple CLI tool used for internal dev things.

Table of Contents

Install

Copy/paste the following command into your terminal:

yarn global add @bva/bva-cli

How To Use

This tool is used by calling bva and passing options to it. For example, if you want to install the Recommendations module to a Slate project you would do:

bva --add @bva/recommendations

Command Options

  • -i --interactive - Uses interactive mode to make it easier to accomplish tasks.

Non interactive commands provide a specific level of control, but most important things can be accomplished by using interactive mode.

  • -a --add - Adds a module to the project its being called from (see below for current list of modules) - Ex: bva --add module-name
  • --add-help - Display the help menu for --add
  • -l --list - Lists all items associated with a specific list type (bva --list module)
  • -h --help - Displays the help menu (bva --help)
  • -v --version - Displays the CLI version (bva --version)

Subhelp Menus

All command options that take arguments will also have an associated help menu to go along with them. To view these help menus you just need to use help as the argument. An example would look like bva --list help. An alias for h will also be accepted bva --list h.

How To Add A Module

Modules are automatically added if certain things are done within the module's codebase. At the simplest level, a module can be added by:

  1. Making sure the name of the module is @bva/module-name in package.json
  2. Adding keywords":["bva-module"] to package.json
  3. Publishing the package to NPM

This will create a BVA scoped package and by adding bva-module as a keyword the CLI tool knows to treat the package as a BVA module.

Adding Files to Slate Projects

Doing the above will allow your package to either yarn add in the Slate project it's requested for, but that's not the main benefit. The main benefit of using the CLI tool for installing BVA modules is extra files can also be added to the project. The purpose of these extra files is to provide developers with the ability to rapidly develop a feature using the module. So usually these files would include some of the baseline required code to get the module working. To add extra files to modules, do the following:

  1. Create a root level folder called templates. Steps 2-5 are performed within the templates folder.
  2. (optional) To add a JS file, create a file with the following structure: bva-module-name.js
  3. (optional) To add a stylesheet, create a file with the following structure: bva-module-name.scss
  4. (optional) To add a section, create a file with the following structure: section-bva-module-name.liquid
  5. (optional) To add a snippet, create a files with the following structure: snippet-bva-module-name.liquid

Any or all of the files above marked (optional) can be omitted and everything else will be handled by the CLI tool.

Contributing

See the wiki for details

Changelog

To see the most recent changes view the CHANGELOG.