Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bva/bva-cli

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bva/bva-cli

CLI for internal and external BVA tools

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
4
Weekly downloads
 
Created
Source

bva-cli

A simple CLI tool used for internal dev things.

Table of Contents

  • Install
  • How To Use
  • Command Options
  • Subhelp Menus
  • How To Add A Module
  • Contributing
  • Changelog

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.

Keywords

FAQs

Package last updated on 11 Oct 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc