Socket
Socket
Sign inDemoInstall

@pwabuilder/cli

Package Overview
Dependencies
269
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @pwabuilder/cli

The [PWABuilder](https://www.pwabuilder.com/) CLI allows you to create a new Progressive Web App from the command line.


Version published
Weekly downloads
93
decreased by-16.22%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

PWABuilder CLI

The PWABuilder CLI allows you to create a new Progressive Web App from the command line.

Installing

To install with npm:

npm install -g @pwabuilder/cli

The -g flag indicates a global installation and will allow you to use the CLI from any directory.

Basic Usage

create

The CLI's primary purpose to create new Progressive Web Apps. To create a new app, open a command line of your choice and run:

pwa create

This command will prompt you for a name, but you can skip prompting by providing a name:

pwa create <app-name>

Using Templates

PWABuilder currently offers two different PWA templates:

  • default - The original PWA Starter template. This template has full documentation available and is our recommended choice.
  • basic - A simplified version of the PWA Starter template. This template has fewer dependencies and is closer to VanillaJS than the default template.

You can specify a template with the -t|--template option:

pwa create <app-name> -t=basic

start

When run from a valid PWA Starter directory, the start command will use Vite to host your PWA on a development server:

pwa start

You can pass arguments to vite with the --viteArgs options:

pwa start --viteArgs="<argument string here>"

See Vite's Config Reference for more details.

build

When run from a valid PWA Starter directory, the build command will use Vite to build and pack your app for production:

pwa build

You can pass arguments to Vite with the --viteArgs options:

pwa build --viteArgs="<argument string here>"

See Vite's Config Reference for more details.

Resources

FAQs

Last updated on 18 Sep 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc